mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
Add wait event for the group commit delay before WAL flush
Author: Rafia Sabih <rafia.pghackers@gmail.com> Reviewed-by: Sami Imseih <samimseih@gmail.com> Discussion: https://www.postgresql.org/message-id/CA%2BFpmFf-hWXtrC0Q3Cr_Xo78zuP_M_VC5xgWPOYOkwqOD0T8eg@mail.gmail.com
This commit is contained in:
@@ -2884,7 +2884,9 @@ XLogFlush(XLogRecPtr record)
|
||||
if (CommitDelay > 0 && enableFsync &&
|
||||
MinimumActiveBackends(CommitSiblings))
|
||||
{
|
||||
pgstat_report_wait_start(WAIT_EVENT_COMMIT_DELAY);
|
||||
pg_usleep(CommitDelay);
|
||||
pgstat_report_wait_end();
|
||||
|
||||
/*
|
||||
* Re-check how far we can now flush the WAL. It's generally not
|
||||
|
||||
@@ -175,6 +175,7 @@ Section: ClassName - WaitEventTimeout
|
||||
|
||||
BASE_BACKUP_THROTTLE "Waiting during base backup when throttling activity."
|
||||
CHECKPOINT_WRITE_DELAY "Waiting between writes while performing a checkpoint."
|
||||
COMMIT_DELAY "Waiting for commit delay before WAL flush."
|
||||
PG_SLEEP "Waiting due to a call to <function>pg_sleep</function> or a sibling function."
|
||||
RECOVERY_APPLY_DELAY "Waiting to apply WAL during recovery because of a delay setting."
|
||||
RECOVERY_RETRIEVE_RETRY_INTERVAL "Waiting during recovery when WAL data is not available from any source (<filename>pg_wal</filename>, archive or stream)."
|
||||
|
||||
Reference in New Issue
Block a user