Skip to content

Commit e3e29ce

Browse files
committed
Make autovacuum launcher more responsive to pg_log_backend_memory_contexts().
Previously when pg_log_backend_memory_contexts() sent the request to the autovacuum launcher, it could take more than several seconds to log its memory contexts. Because the function (HandleAutoVacLauncherInterrupts) to process any new interrupts that autovacuum launcher received didn't handle the request for logging of memory contexts. This commit changes the function so that it handles the request, to make autovacuum launcher more responsitve to pg_log_backend_memory_contexts(). Back-patch to v14 where pg_log_backend_memory_contexts() was added. Author: Koyu Tanigawa Reviewed-by: Bharath Rupireddy, Atsushi Torikoshi Discussion: https://postgr.es/m/0aae3e074face409b35153451be5cc11@oss.nttdata.com
1 parent 292698f commit e3e29ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/postmaster/autovacuum.c

+4
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,10 @@ HandleAutoVacLauncherInterrupts(void)
836836
if (ProcSignalBarrierPending)
837837
ProcessProcSignalBarrier();
838838

839+
/* Perform logging of memory contexts of this process */
840+
if (LogMemoryContextPending)
841+
ProcessLogMemoryContextInterrupt();
842+
839843
/* Process sinval catchup interrupts that happened while sleeping */
840844
ProcessCatchupInterrupt();
841845
}

0 commit comments

Comments
 (0)