From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | bt21tanigaway <bt21tanigaway(at)oss(dot)nttdata(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Fix pg_log_backend_memory_contexts() 's delay |
Date: | 2021-10-09 13:26:06 |
Message-ID: | CALj2ACUU1HMKY-WqyOXw9qajWqAU-jHP+nxnUSC=Xqg0QH1-tg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 8, 2021 at 8:58 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> >>> Thanks for the patch. Do we also need to do the change in
> >>> HandleMainLoopInterrupts, HandleCheckpointerInterrupts,
> >>> HandlePgArchInterrupts, HandleWalWriterInterrupts as we don't call
> >>> CHECK_FOR_INTERRUPTS() there?
> >
> >> Yeah, that's still some information that the user asked for. Looking
> >> at the things that have a PGPROC entry, should we worry about the main
> >> loop of the logical replication launcher?
> >
> > ・Now, the target of “pg_log_backend_memory_contexts()” is “autovacuum launcher” and “logical replication launcher”. I observed that the delay occurred only in “autovacuum launcher” not in “logical replication launcher”.
> > ・”autovacuum launcher” used “HandleAutoVacLauncherInterrupts()” ( not including “ProcessLogMemoryContextInterrupt()” ) instead of “ProcessInterrupts() ( including “ProcessLogMemoryContextInterrupt()” ). “ProcessLogMemoryContextInterrupt()” will not be executed until the next “ProcessInterrupts()” is executed. So, I added “ProcessLogMemoryContextInterrupt()”.
> > ・”logical replication launcher” uses only “ProcessInterrupts()”. So, We don’t have to fix it.
>
> Yes.
+1 to keep this thread for fixing the pg_log_backend_memory_contexts()
issue for the autovacuum launcher. And the patch
"fix_log_output_delay" looks good to me. I think we can add a CF
entry.
> >> IMHO, we can support all the processes which return a PGPROC entry by
> >> both BackendPidGetProc and AuxiliaryPidGetProc where the
> >> AuxiliaryPidGetProc would cover the following processes. I'm not sure
> >> one is interested in the memory context info of auxiliary processes.
>
> I like this idea because it seems helpful at least for debug purpose.
>
>
> > ・The purpose of this patch is to solve the delay problem, so I would like another patch to deal with “ BackendPidGetProc” and “AuxiliaryPidGetProc”.
>
> +1 to improve those things separately.
I started a separate thread [1], and I have a couple of open points
there. Please feel free to provide your thoughts in [1].
Regards,
Bharath Rupireddy.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-10-09 14:44:36 | Re: starts_with, ^@ and index usage |
Previous Message | Bharath Rupireddy | 2021-10-09 13:23:56 | enhance pg_log_backend_memory_contexts() to log memory contexts of auxiliary processes |