From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | gkokolatos(at)protonmail(dot)com |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: shared-memory based stats collector |
Date: | 2020-11-06 00:27:56 |
Message-ID: | 20201106.092756.2037951729547156324.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Wed, 04 Nov 2020 17:39:10 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> At Fri, 30 Oct 2020 15:00:55 +0000, Georgios Kokolatos <gkokolatos(at)protonmail(dot)com> wrote in
> > Hi,
> >
> > I noticed that according to the cfbot this patch no longer applies.
> >
> > As it is registered in the upcoming commitfest, it would be appreciated
> > if you could rebase it.
>
> Thanks! The replication slot stats patch (9868167500) hit this.
>
> - Fixed a bug of original code.
>
> get_stat_entry() returned a wrong result to found when shared entry
> exists but it is not locally cached.
>
> - Moved replication slot stats into shared memory stats.
>
> Differently from wal_stats and slru_stats, it can be implemented as a
> part of unified stats entry. I'm tempted to remove the entry for a
> dropped slot immediately, but I didn't that since the number of the
> slots should be under 10 or so and dropping an entry requires
> exclusive lock on dshash. Instead, dropped entries are removed at
> file-write time that happens only at the end of a process.
>
>
> I had to clean up replication slots in pgstat_beshutdown_hook(). Even
> though we have exactly the same code in several other places, the
> function must be called before disabling DSA because we cannot update
> statistics after detaching the shared-memory stats. Perhaps we can
> remove some of the existing calling to ReplicationSlotCleanup() but I
> haven't do that in this version.
Fixed a bug that pgstat_report_replslot fails to reuse entries that
are marked as "dropped".
Fixed comments for the caller sites to pgstat_report_replslot(_drop)
in ReplicationSlotCreate() and ReplicationSlotDropPtr().
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
v41-0001-sequential-scan-for-dshash.patch | text/x-patch | 8.8 KB |
v41-0002-Add-conditional-lock-feature-to-dshash.patch | text/x-patch | 6.2 KB |
v41-0003-Make-archiver-process-an-auxiliary-process.patch | text/x-patch | 17.7 KB |
v41-0004-Shared-memory-based-stats-collector.patch | text/x-patch | 296.7 KB |
v41-0005-Doc-part-of-shared-memory-based-stats-collector.patch | text/x-patch | 20.7 KB |
v41-0006-Remove-the-GUC-stats_temp_directory.patch | text/x-patch | 13.6 KB |
v41-0007-Exclude-pg_stat-directory-from-base-backup.patch | text/x-patch | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2020-11-06 00:32:35 | Re: list_free() in index_get_partition() |
Previous Message | osumi.takamichi@fujitsu.com | 2020-11-05 23:57:29 | RE: extension patch of CREATE OR REPLACE TRIGGER |