git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 8b1dccd) | patch
pgstat: revise replication slot API in preparation for shared memory stats.
Thu, 7 Apr 2022 01:26:17 +0000 (18:26 -0700)
Thu, 7 Apr 2022 01:38:24 +0000 (18:38 -0700)
commit e41aed674f35c63380175bb0e2dfa8dccfb2204d
pgstat: revise replication slot API in preparation for shared memory stats.

Previously the pgstat <-> replication slots API was done with on the basis of
names. However, the upcoming move to storing stats in shared memory makes it
more convenient to use a integer as key.

Change the replication slot functions to take the slot rather than the slot
name, and expose ReplicationSlotIndex() to compute the index of an replication
slot. Special handling will be required for restarts, as the index is not
stable across restarts. For now pgstat internally still uses names.

Rename pgstat_report_replslot_{create,drop}() to
pgstat_{create,drop}_replslot() to match the functions for other kinds of
stats.

Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20220404041516.cctrvpadhuriawlq@alap3.anarazel.de
src/backend/postmaster/pgstat.c diff | blob | blame | history
src/backend/replication/logical/logical.c diff | blob | blame | history
src/backend/replication/slot.c diff | blob | blame | history
src/backend/utils/activity/pgstat_replslot.c diff | blob | blame | history
src/include/pgstat.h diff | blob | blame | history
src/include/replication/slot.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /