Re: shared-memory based stats collector

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: andres(at)anarazel(dot)de
Cc: tomas(dot)vondra(at)2ndquadrant(dot)com, alvherre(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-19 12:40:07
Message-ID: 20190219.214007.134114508.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 18 Feb 2019 21:35:31 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20190218(dot)213531(dot)89078771(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> I'm trying removing pgStatPendingTabHash it does't work yet. I'll
> include it in the next version.

Done. Passed a test for the case of internittent dshash lock
failure, which causes "pending" of local stats info.

- Removed pgStatPendingTabHash. "Pending" table entries are left
in pgStatTabList after pgstat_update_stat(). There's no longer
a "pending" stats store.

- Fixed several bugs of reading/writing at-rest file.

- Transactional snapshot behaved wrongly. Fixed it.

- In this project SQL helper functions are renamed from
pgstat_fetch_stat_* to backend_fetch_stat_* because the
functions with the similar cuntion are implemented for writer
side and they have the names of pgstat_fetch_stat_*.

But some of the functions had very confusing names that don't
follow the convention.

- Split pgStatLocalContext into pgSharedStatsContext and
pgStatSnapshotContext. The former is for shared statistics and
the latter is for transactional snapshot.

- Clean up pgstat.[ch] removing stale lines, fixing bogus comments.

This version is heavily improved from the previous version.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
v15-0001-sequential-scan-for-dshash.patch text/x-patch 10.6 KB
v15-0002-Add-conditional-lock-feature-to-dshash.patch text/x-patch 5.0 KB
v15-0003-Make-archiver-process-an-auxiliary-process.patch text/x-patch 12.0 KB
v15-0004-Shared-memory-based-stats-collector.patch text/x-patch 467.9 KB
v15-0005-Remove-the-GUC-stats_temp_directory.patch text/x-patch 10.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-02-19 12:47:23 Re: Conflict handling for COPY FROM
Previous Message Michael Meskes 2019-02-19 12:14:31 Re: SQL statement PREPARE does not work in ECPG