mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
Refactor some code related to wait events "BufferPin" and "Extension"
The following changes are done: - Addition of WaitEventBufferPin and WaitEventExtension, that hold a list of wait events related to each category. - Addition of two functions that encapsulate the list of wait events for each category. - Rename BUFFER_PIN to BUFFERPIN (only this wait event class used an underscore, requiring a specific rule in the automation script). These changes make a bit easier the automatic generation of all the code and documentation related to wait events, as all the wait event categories are now controlled by consistent structures and functions. Author: Bertrand Drouvot Discussion: https://postgr.es/m/c6f35117-4b20-4c78-1df5-d3056010dcf5@gmail.com Discussion: https://postgr.es/m/77a86b3a-c4a8-5f5d-69b9-d70bbf2e9b98@gmail.com
This commit is contained in:
@@ -4901,7 +4901,7 @@ LockBufferForCleanup(Buffer buffer)
|
||||
SetStartupBufferPinWaitBufId(-1);
|
||||
}
|
||||
else
|
||||
ProcWaitForSignal(PG_WAIT_BUFFER_PIN);
|
||||
ProcWaitForSignal(WAIT_EVENT_BUFFER_PIN);
|
||||
|
||||
/*
|
||||
* Remove flag marking us as waiter. Normally this will not be set
|
||||
|
@@ -840,7 +840,7 @@ ResolveRecoveryConflictWithBufferPin(void)
|
||||
* SIGHUP signal handler, etc cannot do that because it uses the different
|
||||
* latch from that ProcWaitForSignal() waits on.
|
||||
*/
|
||||
ProcWaitForSignal(PG_WAIT_BUFFER_PIN);
|
||||
ProcWaitForSignal(WAIT_EVENT_BUFFER_PIN);
|
||||
|
||||
if (got_standby_delay_timeout)
|
||||
SendRecoveryConflictWithBufferPin(PROCSIG_RECOVERY_CONFLICT_BUFFERPIN);
|
||||
|
Reference in New Issue
Block a user