# HG changeset patch # User Alain Mazy # Date 1759510624 -7200 # Node ID 55a827c8913a6bad7ef72c6d2d8cb4283c81ffb4 # Parent 78fdfbe7b1fdccb5d1d72639ec4114dac6e6ad73 adding a 1 sec delay to allow time for propagation to read-replicas diff -r 78fdfbe7b1fd -r 55a827c8913a PostgreSQL/Plugins/PostgreSQLIndex.cpp --- a/PostgreSQL/Plugins/PostgreSQLIndex.cpp Fri Oct 03 18:39:46 2025 +0200 +++ b/PostgreSQL/Plugins/PostgreSQLIndex.cpp Fri Oct 03 18:57:04 2025 +0200 @@ -277,6 +277,9 @@ { int currentRevision = 0; + // wait 1s before reading the patch level in case you are using read-replicas + boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); + if (!LookupGlobalIntegerProperty(currentRevision, manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabasePatchLevel)) { LOG(ERROR) << "No Database revision found after the upgrade !";