pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bt21tanigaway <bt21tanigaway@oss.nttdata.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Fix pg_log_backend_memory_contexts() 's delay
Date: Wed, 06 Oct 2021 17:14:51 +0900
Message-ID: <1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com> (raw)
In-Reply-To: <YVziXut4efh+jdxR@paquier.xyz>
References: <0aae3e074face409b35153451be5cc11@oss.nttdata.com>
	<CALj2ACVpGVeZw6OO8yeROcn9347kbEppph5Pc1WzJJx3EjXNyg@mail.gmail.com>
	<4055757.1633436879@sss.pgh.pa.us>
	<CA+TgmobT79Q+GL+0_350Cr8qHcraiN+siUJeR3oBoMbtfL4JZg@mail.gmail.com>
	<YVziXut4efh+jdxR@paquier.xyz>

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





view thread (12+ messages)  latest in thread

Message-ID: <1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com>
Permalink:  ../1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com/
Also on:    postgresql.org/message-id/1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: bt21tanigaway@oss.nttdata.com, michael@paquier.xyz, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, bharath.rupireddyforpostgres@gmail.com
  Subject: Re: Fix pg_log_backend_memory_contexts() 's delay
  In-Reply-To: <1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com>
  References: <0aae3e074face409b35153451be5cc11@oss.nttdata.com> <CALj2ACVpGVeZw6OO8yeROcn9347kbEppph5Pc1WzJJx3EjXNyg@mail.gmail.com> <4055757.1633436879@sss.pgh.pa.us> <CA+TgmobT79Q+GL+0_350Cr8qHcraiN+siUJeR3oBoMbtfL4JZg@mail.gmail.com> <YVziXut4efh+jdxR@paquier.xyz> <1accf2ba3912f3f59a60ef90b5411433@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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