Re: Get memory contexts of an arbitrary backend process

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, gkokolatos(at)protonmail(dot)com, kasahara(dot)tatsuhito(at)gmail(dot)com, Craig Ringer <craig(at)2ndquadrant(dot)com>
Subject: Re: Get memory contexts of an arbitrary backend process
Date: 2021-04-05 03:20:36
Message-ID: CALNJ-vQ=x-9AgsVA5fQH_LZQABr+G3ATCPoWE-WFmwjd9Lhp3w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Apr 4, 2021 at 7:56 PM torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
wrote:

> On 2021-04-01 19:13, Fujii Masao wrote:
> > On 2021/03/31 15:16, Kyotaro Horiguchi wrote:
> >>> + The memory contexts will be logged based on the log configuration
> >>> set. For example:
> >>>
> >>> How do you think?
> >>
> >> How about "The memory contexts will be logged in the server log" ?
> >> I think "server log" doesn't suggest any concrete target.
> >
> > Or just using "logged" is enough?
> >
> > Also I'd like to document that one message for each memory context is
> > logged.
> > So what about the following?
> >
> > One message for each memory context will be logged. For example,
>
>
> Agreed.
>
> BTW, there was a conflict since c30f54ad732(Detect POLLHUP/POLLRDHUP
> while
> running queries), attached v9.
>
>
> Regards,

Hi,

+ * On receipt of this signal, a backend sets the flag in the signal
+ * handler, and then which causes the next CHECK_FOR_INTERRUPTS()

I think the 'and then' is not needed:

handler which causes the next ...

+ * This is just a warning so a loop-through-resultset will not abort
+ * if one backend logged its memory contexts during the run.

The pid given by arg 0 is not a PostgreSQL server process. Which other
backend could it be ?

Thanks

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-04-05 03:21:03 Re: A new function to wait for the backend exit after termination
Previous Message torikoshia 2021-04-05 02:55:47 Re: Get memory contexts of an arbitrary backend process