mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
Track logrep apply workers' last start times to avoid useless waits.
Enforce wal_retrieve_retry_interval on a per-subscription basis, rather than globally, and arrange to skip that delay in case of an intentional worker exit. This probably makes little difference in the field, where apply workers wouldn't be restarted often; but it has a significant impact on the runtime of our logical replication regression tests (even though those tests use artificially-small wal_retrieve_retry_interval settings already). Nathan Bossart, with mostly-cosmetic editorialization by me Discussion: https://postgr.es/m/20221122004119.GA132961@nathanxps13
This commit is contained in:
@ -1504,6 +1504,16 @@ DropSubscription(DropSubscriptionStmt *stmt, bool isTopLevel)
|
||||
}
|
||||
list_free(subworkers);
|
||||
|
||||
/*
|
||||
* Remove the no-longer-useful entry in the launcher's table of apply
|
||||
* worker start times.
|
||||
*
|
||||
* If this transaction rolls back, the launcher might restart a failed
|
||||
* apply worker before wal_retrieve_retry_interval milliseconds have
|
||||
* elapsed, but that's pretty harmless.
|
||||
*/
|
||||
ApplyLauncherForgetWorkerStartTime(subid);
|
||||
|
||||
/*
|
||||
* Cleanup of tablesync replication origins.
|
||||
*
|
||||
|
Reference in New Issue
Block a user