postgres.git / summary / log / commit / refs

commit    e3e29cec10d15bbcedc6b41887d8f4e138d719bd
Author:   Fujii Masao <fujii@postgresql.org>
Date:     Tue Oct 12 00:50:17 2021 +0000
First released in: 15.0, 14.1

    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


src/backend/postmaster/autovacuum.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 3b3df8fa8cc..96332320a73 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -836,6 +836,10 @@ HandleAutoVacLauncherInterrupts(void) if (ProcSignalBarrierPending) ProcessProcSignalBarrier(); + /* Perform logging of memory contexts of this process */ + if (LogMemoryContextPending) + ProcessLogMemoryContextInterrupt(); + /* Process sinval catchup interrupts that happened while sleeping */ ProcessCatchupInterrupt(); } [parent: 292698f158dd]