File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
postgresql/src/storages/postgres/detail/topology Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -315,18 +315,17 @@ void HotStandby::RunCheck(DsnIndex idx) {
315315 }
316316 }
317317 auto deadline = GetTestsuiteControl ().MakeExecuteDeadline (kCheckTimeout );
318- auto start = std::chrono::steady_clock::now ();
319318 try {
320319 state.connection ->RefreshReplicaState (deadline);
321320 state.role = state.connection ->IsInRecovery () ? ClusterHostType::kSlave : ClusterHostType::kMaster ;
322321 state.is_readonly = state.connection ->IsReadOnly ();
323- state.roundtrip_time = std::chrono::duration_cast<Rtt>(std::chrono::steady_clock::now () - start);
324-
325322 const auto & wal_info_stmts = GetWalInfoStatementsForVersion (state.connection ->GetServerVersion ());
326323 std::optional<std::chrono::system_clock::time_point> current_xact_timestamp;
327324
325+ auto start = std::chrono::steady_clock::now ();
328326 const auto wal_info =
329327 state.connection ->Execute (state.connection ->IsInRecovery () ? wal_info_stmts.slave : wal_info_stmts.master );
328+ state.roundtrip_time = std::chrono::duration_cast<Rtt>(std::chrono::steady_clock::now () - start);
330329 wal_info.Front ().To (state.wal_lsn , current_xact_timestamp);
331330 if (current_xact_timestamp) {
332331 state.current_xact_timestamp = *current_xact_timestamp;
You can’t perform that action at this time.
0 commit comments