mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Make bgwriter sleep longer when it has no work to do, to save electricity.
To make it wake up promptly when activity starts again, backends nudge it by setting a latch in MarkBufferDirty(). The latch is kept set while bgwriter is active, so there is very little overhead from that when the system is busy. It is only armed before going into longer sleep. Peter Geoghegan, with some changes by me.
This commit is contained in:
@@ -213,7 +213,7 @@ extern bool HoldingBufferPinThatDelaysRecovery(void);
|
||||
extern void AbortBufferIO(void);
|
||||
|
||||
extern void BufmgrCommit(void);
|
||||
extern void BgBufferSync(void);
|
||||
extern bool BgBufferSync(void);
|
||||
|
||||
extern void AtProcExit_LocalBuffers(void);
|
||||
|
||||
|
Reference in New Issue
Block a user