Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process

From: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
Date: 2018-09-01 19:04:19
Message-ID: CAEepm=0=PkSXQ5oNU8BhY1DEzxw_EspsU14D_zAPnj+fBAjxFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 19, 2018 at 11:51 PM Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Thu, Jul 19, 2018 at 10:30 PM, Kyotaro HORIGUCHI
> > Yeah. That seems good. Couldn't we reuse prepared WaitEventSet in
> > other places? For example PgstatCollectorMain has the same
> > characteristics, where WaitLatchOrSocket is used with fixed
> > parameters and waiting on a socket which gets frequent receipts.
>
> +1, but I'm considering that to be a separate project, or I'll never
> get this patch committed. It may be possible to have a small number
> of them reused in many places, and it may be possible for
> WaitLatchXXX() to reuse them automatically (so we don't have to change
> every call site).
>
> > # Is it intentional that the patch doesn't touch pgstat.c?
>
> Yes. pgstat.c still uses WL_POSTMASTER_DEATH because it does
> something special: it calls pgstat_write_statsfiles() before it exits.

Rebased.

--
Thomas Munro
http://www.enterprisedb.com

Attachment Content-Type Size
0001-Add-WL_EXIT_ON_PM_DEATH-pseudo-event-v3.patch application/octet-stream 37.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-09-01 19:04:21 Re: [PATCH] Fix docs to JOHAB encoding on server side
Previous Message Thomas Munro 2018-09-01 18:48:56 Re: Undo logs