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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: b4080fa) | patch
Track invalidation_reason in pg_replication_slots.
2024年3月22日 08:22:05 +0000 (13:52 +0530)
2024年3月22日 08:22:05 +0000 (13:52 +0530)
commit 6ae701b4378db2284c77314560e95a93d0ba9484
Track invalidation_reason in pg_replication_slots.

Till now, the reason for replication slot invalidation is not tracked
directly in pg_replication_slots. A recent commit 007693f2a3 added
'conflict_reason' to show the reasons for slot conflict/invalidation, but
only for logical slots.

This commit adds a new column 'invalidation_reason' to show invalidation
reasons for both physical and logical slots. And, this commit also turns
'conflict_reason' text column to 'conflicting' boolean column (effectively
reverting commit 007693f2a3). The 'conflicting' column is true for
invalidation reasons 'rows_removed' and 'wal_level_insufficient' because
those make the slot conflict with recovery. When 'conflicting' is true,
one can now look at the new 'invalidation_reason' column for the reason
for the logical slot's conflict with recovery.

The new 'invalidation_reason' column will also be useful to track other
invalidation reasons in the future commit.

Author: Bharath Rupireddy
Reviewed-by: Bertrand Drouvot, Amit Kapila, Shveta Malik
Discussion: https://www.postgresql.org/message-id/ZfR7HuzFEswakt/a%40ip-10-97-1-34.eu-west-3.compute.internal
Discussion: https://www.postgresql.org/message-id/CALj2ACW4aUe-_uFQOjdWCEN-xXoLGhmvRFnL8SNw_TZ5nJe+aw@mail.gmail.com
13 files changed:
doc/src/sgml/ref/pgupgrade.sgml diff | blob | blame | history
doc/src/sgml/system-views.sgml diff | blob | blame | history
src/backend/catalog/system_views.sql diff | blob | blame | history
src/backend/replication/logical/slotsync.c diff | blob | blame | history
src/backend/replication/slot.c diff | blob | blame | history
src/backend/replication/slotfuncs.c diff | blob | blame | history
src/bin/pg_upgrade/info.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/include/replication/slot.h diff | blob | blame | history
src/test/recovery/t/035_standby_logical_decoding.pl diff | blob | blame | history
src/test/recovery/t/040_standby_failover_slots_sync.pl diff | blob | blame | history
src/test/regress/expected/rules.out diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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