Re: shared-memory based stats collector

From: Andres Freund <andres(at)anarazel(dot)de>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: masao(dot)fujii(at)oss(dot)nttdata(dot)com, gkokolatos(at)protonmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: shared-memory based stats collector
Date: 2021-03-12 03:22:57
Message-ID: 20210312032257.zf2rdoruthxgnpwv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-03-10 20:26:56 -0800, Andres Freund wrote:
> > +static void
> > +attach_shared_stats(void)
> > +{
> > + MemoryContext oldcontext;
>
> > + /*
> > + * The first attacher backend may still reading the stats file, or the
> > + * last detacher may writing it. Wait for the work to finish.
> > + */
>
> I still believe this kind of approach is too complicated, and we should
> simply not do any of this "first attacher" business. Instead read it in
> the startup process or such.

I started changing the patch to address my complaints. I'll try to do
it as an incremental patch ontop of your 0004, but it might become too
unwieldy. Not planning to touch other patches for now (and would be
happy if the first few were committed). I do think we'll have to
split 0004 a bit - it's just too large to commit as is, I think.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-03-12 03:24:09 Re: [HACKERS] Custom compression methods
Previous Message Dilip Kumar 2021-03-12 03:08:41 Re: [HACKERS] Custom compression methods