Re: shared-memory based stats collector

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: a(dot)zakirov(at)postgrespro(dot)ru
Cc: alvherre(at)2ndquadrant(dot)com, andres(at)anarazel(dot)de, tomas(dot)vondra(at)2ndquadrant(dot)com, ah(at)cybertec(dot)at, magnus(at)hagander(dot)net, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org
Subject: Re: shared-memory based stats collector
Date: 2019-02-22 08:19:56
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello, Arthur.

At Thu, 21 Feb 2019 17:30:50 +0300, Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> wrote in <db346d14-4130-57a5-5f46-9a57e9982bec(at)postgrespro(dot)ru>
> Hello,
> On 21.02.2019 10:05, Kyotaro HORIGUCHI wrote:
> > Done. This verison 16 looks as if the moving and splitting were
> > not happen. Major changes are:
> > - Restored old pgstats_* names. This largily shrinks the patch
> > size to less than a half lines of v15. More than that, it
> > gets easier to examine differences. (checkpointer.c and
> > bgwriter.c have a bit stale comments but it is an issue for
> > later.)
> > - Removed "oneshot" feature at all. This simplifies pgstat API
> > and let this patch far less simple.
> > - Moved StatsLock to LWTRANCHE_STATS, which is not necessary to
> > be in the main tranche.
> > - Fixed several bugs revealed by the shrinked size of the patch.
> I run regression tests. Unfortunately tests didn't pass, failed test
> is 'rangetypes':
> rangetypes ... FAILED (test process exited with exit code 2)
> It seems to me that an autovacuum process terminates because of
> segfault.
> Segfault occurs within get_pgstat_tabentry_relid(). If I'm not
> mistaken, somehow 'dbentry' hasn't valid pointer anymore.
> 'dbentry' is get in the line in do_autovacuum():
> dbentry = pgstat_fetch_stat_dbentry(MyDatabaseId);
> 'dbentry' becomes invalid after calling pgstat_vacuum_stat().

Thank you very much for the report. I haven't seen the error, but
I think you gave me enough information about the issue. I try to
reproduce it.

I found another problem commit_ts test reliably fails by dshash
corruption in startup process. I've not found why and will
investigate it, too.


Kyotaro Horiguchi
NTT Open Source Software Center

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message mitani 2019-02-22 08:33:07 Re: [PATCH] Allow transaction to partition table using FDW
Previous Message Etsuro Fujita 2019-02-22 08:17:24 Re: Problems with plan estimates in postgres_fdw