Re: Replication slot stats misgivings
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>, Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Date: 2021-04-22T10:54:54Z
Lists: pgsql-hackers
On Thu, Apr 22, 2021 at 1:02 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > Thanks, it looks good to me now. I'll review/test some more before committing but at this stage, I would like to know from Andres or others whether they see any problem with this approach to fixing a few of the problems reported in this thread. Basically, it will fix the cases where the drop message is lost and we were not able to record stats for new slots and writing beyond the end of the array when after restarting the number of slots whose stats are stored in the stats file exceeds max_replication_slots. It uses HTAB instead of an array to record slot stats and also taught pgstat_vacuum_stat() to search for all the dead replication slots in stats hashtable and tell the collector to remove them. This still uses slot_name as the key because we were not able to find a better way to use slot's idx. Andres, unless you see any problems with this approach, I would like to move forward with this early next week? -- With Regards, Amit Kapila.
Commits
-
Doc: Update logical decoding stats information.
- 0c6b92d9c6fb 14.0 landed
-
Fix tests for replication slots stats.
- fc69509131c3 14.0 landed
-
Update replication statistics after every stream/spill.
- 592f00f8dec6 14.0 landed
-
Fix the computation of slot stats for 'total_bytes'.
- 205f466282be 14.0 landed
-
Another try to fix the test case added by commit f5fc2f5b23.
- 51ef9173030c 14.0 landed
-
Use HTAB for replication slot statistics.
- 3fa17d37716f 14.0 landed
-
Fix test case added by commit f5fc2f5b23.
- c64dcc7fee5f 14.0 landed
-
Add information of total data processed to replication slot stats.
- f5fc2f5b23d1 14.0 landed
-
Use NameData datatype for slotname in stats.
- cca57c1d9bf7 14.0 landed