pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedFix pg_log_backend_memory_contexts() 's delay
12+ messages / 7 participants
[nested] [flat]
Commits from this thread:
2021-10-12 e3e29cec10 62e821ad28 Make autovacuum launcher more responsive to pg_log_backend_memory_contexts().
* Fix pg_log_backend_memory_contexts() 's delay
@ 2021-10-05 09:20 bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: bt21tanigaway @ 2021-10-05 09:20 UTC (permalink / raw)
To: pgsql-hackers@lists.postgresql.org
Hi,
Log output takes time between several seconds to a few tens when using
‘SELECT pg_log_backend_memory_contexts(1234)’ with PID of ‘autovacuum
launcher’.
I made a patch for this problem.
regards,
Koyu Tanigawa
Attachments:
fix_log_output_delay.patch (text/x-diff, 506B) download
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 3b3df8fa8c..7ebe5ae8dc 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -836,6 +836,9 @@ HandleAutoVacLauncherInterrupts(void)
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
+ if (LogMemoryContextPending)
+ ProcessLogMemoryContextInterrupt();
+
/* Process sinval catchup interrupts that happened while sleeping */
ProcessCatchupInterrupt();
}
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
@ 2021-10-05 10:35 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 12+ messages in thread
From: Bharath Rupireddy @ 2021-10-05 10:35 UTC (permalink / raw)
To: bt21tanigaway <bt21tanigaway@oss.nttdata.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Oct 5, 2021 at 2:50 PM bt21tanigaway
<bt21tanigaway@oss.nttdata.com> wrote:
>
> Hi,
>
> Log output takes time between several seconds to a few tens when using
> ‘SELECT pg_log_backend_memory_contexts(1234)’ with PID of ‘autovacuum
> launcher’.
> I made a patch for this problem.
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? And there are also other processes:
pgstat process/statistics collector, syslogger, walreceiver,
walsender, background workers, parallel workers and so on. I think we
need to change in all the processes where we don't call
CHECK_FOR_INTERRUPTS() in their main loops.
Before doing that, we need to be sure of whether we allow only the
user sessions/backend process's memory contexts with
pg_log_backend_memory_contexts or any process that is forked by
postmaster i.e. auxiliary process? The function
pg_log_backend_memory_contexts supports the processes that return a
pgproc structure from this function BackendPidGetProc, it doesn't
attempt to get pgproc structure from AuxiliaryPidGetProc.
Regards,
Bharath Rupireddy.
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2021-10-05 12:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Tom Lane @ 2021-10-05 12:27 UTC (permalink / raw)
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; +Cc: bt21tanigaway <bt21tanigaway@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> On Tue, Oct 5, 2021 at 2:50 PM bt21tanigaway
> <bt21tanigaway@oss.nttdata.com> wrote:
>> Log output takes time between several seconds to a few tens when using
>> ‘SELECT pg_log_backend_memory_contexts(1234)’ with PID of ‘autovacuum
>> launcher’.
>> I made a patch for this problem.
> 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?
It's not real clear to me why we need to care about this in those
processes' idle loops. Their memory consumption is unlikely to be
very interesting in that state, nor could it change before they
wake up.
regards, tom lane
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-10-05 16:16 ` Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 12+ messages in thread
From: Robert Haas @ 2021-10-05 16:16 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; bt21tanigaway <bt21tanigaway@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Oct 5, 2021 at 8:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It's not real clear to me why we need to care about this in those
> processes' idle loops. Their memory consumption is unlikely to be
> very interesting in that state, nor could it change before they
> wake up.
Perhaps that's so, but it doesn't seem like a good reason not to make
them more responsive.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
@ 2021-10-05 23:40 ` Michael Paquier <michael@paquier.xyz>
2021-10-06 02:13 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
0 siblings, 2 replies; 12+ messages in thread
From: Michael Paquier @ 2021-10-05 23:40 UTC (permalink / raw)
To: Robert Haas <robertmhaas@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; bt21tanigaway <bt21tanigaway@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Oct 05, 2021 at 12:16:06PM -0400, Robert Haas wrote:
> Perhaps that's so, but it doesn't seem like a good reason not to make
> them more responsive.
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?
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
@ 2021-10-06 02:13 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
1 sibling, 0 replies; 12+ messages in thread
From: Bharath Rupireddy @ 2021-10-06 02:13 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; bt21tanigaway <bt21tanigaway@oss.nttdata.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Wed, Oct 6, 2021 at 5:10 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Tue, Oct 05, 2021 at 12:16:06PM -0400, Robert Haas wrote:
> > Perhaps that's so, but it doesn't seem like a good reason not to make
> > them more responsive.
>
> 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?
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.
/*
* We set aside some extra PGPROC structures for auxiliary processes,
* ie things that aren't full-fledged backends but need shmem access.
*
* Background writer, checkpointer, WAL writer and archiver run during normal
* operation. Startup process and WAL receiver also consume 2 slots, but WAL
* writer is launched only after startup has exited, so we only need 5 slots.
*/
#define NUM_AUXILIARY_PROCS 5
Regards,
Bharath Rupireddy.
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
@ 2021-10-06 08:14 ` bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
1 sibling, 1 reply; 12+ messages in thread
From: bt21tanigaway @ 2021-10-06 08:14 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; +Cc: Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Thanks for your review.
>> 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.
> 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.
・The purpose of this patch is to solve the delay problem, so I would
like another patch to deal with “ BackendPidGetProc” and
“AuxiliaryPidGetProc”.
Regards,
Koyu Tanigawa
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
@ 2021-10-08 15:28 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-09 13:26 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
0 siblings, 1 reply; 12+ messages in thread
From: Fujii Masao @ 2021-10-08 15:28 UTC (permalink / raw)
To: bt21tanigaway <bt21tanigaway@oss.nttdata.com>; Michael Paquier <michael@paquier.xyz>; +Cc: Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 2021/10/06 17:14, bt21tanigaway wrote:
> Thanks for your review.
>
>>> 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.
>> 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.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2021-10-09 13:26 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-11 05:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay torikoshia <torikoshia@oss.nttdata.com>
0 siblings, 1 reply; 12+ messages in thread
From: Bharath Rupireddy @ 2021-10-09 13:26 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: bt21tanigaway <bt21tanigaway@oss.nttdata.com>; Michael Paquier <michael@paquier.xyz>; Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Fri, Oct 8, 2021 at 8:58 PM Fujii Masao <masao.fujii@oss.nttdata.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].
[1] https://www.postgresql.org/message-id/flat/CALj2ACU1nBzpacOK2q%3Da65S_4%2BOaz_rLTsU1Ri0gf7YUmnmhfQ%4...
Regards,
Bharath Rupireddy.
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-09 13:26 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
@ 2021-10-11 05:28 ` torikoshia <torikoshia@oss.nttdata.com>
2021-10-11 05:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 12+ messages in thread
From: torikoshia @ 2021-10-11 05:28 UTC (permalink / raw)
To: bt21tanigaway@oss.nttdata.com; +Cc: Fujii Masao <masao.fujii@oss.nttdata.com>; Michael Paquier <michael@paquier.xyz>; Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Thanks for the patch!
It might be self-evident, but since there are comments on other process
handlings in HandleAutoVacLauncherInterrupts like below, how about
adding a comment for the consistency?
/* Process barrier events */
if (ProcSignalBarrierPending)
ProcessProcSignalBarrier();
/* Process sinval catchup interrupts that happened while sleeping
*/
ProcessCatchupInterrupt();
Regards,
--
Atsushi Torikoshi
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-09 13:26 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-11 05:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay torikoshia <torikoshia@oss.nttdata.com>
@ 2021-10-11 05:40 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-12 00:53 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 12+ messages in thread
From: Fujii Masao @ 2021-10-11 05:40 UTC (permalink / raw)
To: torikoshia <torikoshia@oss.nttdata.com>; bt21tanigaway@oss.nttdata.com; +Cc: Michael Paquier <michael@paquier.xyz>; Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On 2021/10/11 14:28, torikoshia wrote:
> Thanks for the patch!
>
> It might be self-evident, but since there are comments on other process handlings in HandleAutoVacLauncherInterrupts like below, how about adding a comment for the consistency?
+1
I applied such cosmetic changes to the patch. Patch attached.
Barring any objection, I will commit it and back-port to v14.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachments:
fix_log_output_delay_v2.patch (text/plain, 565B) download
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c
index 3b3df8fa8c..96332320a7 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();
}
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: Fix pg_log_backend_memory_contexts() 's delay
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Re: Fix pg_log_backend_memory_contexts() 's delay Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Re: Fix pg_log_backend_memory_contexts() 's delay Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Michael Paquier <michael@paquier.xyz>
2021-10-06 08:14 ` Re: Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-09 13:26 ` Re: Fix pg_log_backend_memory_contexts() 's delay Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-11 05:28 ` Re: Fix pg_log_backend_memory_contexts() 's delay torikoshia <torikoshia@oss.nttdata.com>
2021-10-11 05:40 ` Re: Fix pg_log_backend_memory_contexts() 's delay Fujii Masao <masao.fujii@oss.nttdata.com>
@ 2021-10-12 00:53 ` Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 0 replies; 12+ messages in thread
From: Fujii Masao @ 2021-10-12 00:53 UTC (permalink / raw)
To: torikoshia <torikoshia@oss.nttdata.com>; bt21tanigaway@oss.nttdata.com; +Cc: Michael Paquier <michael@paquier.xyz>; Robert Haas <robertmhaas@gmail.com>; Tom Lane <tgl@sss.pgh.pa.us>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On 2021/10/11 14:40, Fujii Masao wrote:
>
>
> On 2021/10/11 14:28, torikoshia wrote:
>> Thanks for the patch!
>>
>> It might be self-evident, but since there are comments on other process handlings in HandleAutoVacLauncherInterrupts like below, how about adding a comment for the consistency?
>
> +1
>
> I applied such cosmetic changes to the patch. Patch attached.
> Barring any objection, I will commit it and back-port to v14.
Pushed. Thanks!
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 12+ messages in thread
end of thread, other threads:[~2021-10-12 00:53 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05 09:20 Fix pg_log_backend_memory_contexts() 's delay bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-05 10:35 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-05 12:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-10-05 16:16 ` Robert Haas <robertmhaas@gmail.com>
2021-10-05 23:40 ` Michael Paquier <michael@paquier.xyz>
2021-10-06 02:13 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-06 08:14 ` bt21tanigaway <bt21tanigaway@oss.nttdata.com>
2021-10-08 15:28 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-09 13:26 ` Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
2021-10-11 05:28 ` torikoshia <torikoshia@oss.nttdata.com>
2021-10-11 05:40 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2021-10-12 00:53 ` Fujii Masao <masao.fujii@oss.nttdata.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox