mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Fix statistics reporting in logical replication workers
This new arrangement ensures that statistics are reported right after commit of transactions. The previous arrangement didn't get this quite right and could lead to assertion failures. Author: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reported-by: Erik Rijkers <er@xs4all.nl>
This commit is contained in:
@ -453,6 +453,7 @@ apply_handle_commit(StringInfo s)
|
||||
replorigin_session_origin_timestamp = commit_data.committime;
|
||||
|
||||
CommitTransactionCommand();
|
||||
pgstat_report_stat(false);
|
||||
|
||||
store_flush_position(commit_data.end_lsn);
|
||||
}
|
||||
@ -462,7 +463,6 @@ apply_handle_commit(StringInfo s)
|
||||
/* Process any tables that are being synchronized in parallel. */
|
||||
process_syncing_tables(commit_data.end_lsn);
|
||||
|
||||
pgstat_report_stat(false);
|
||||
pgstat_report_activity(STATE_IDLE, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user