postgresql/src/backend
Alvaro Herrera 1ad033df16
Ignore invalidated slots while computing oldest catalog Xmin
Once a logical slot has acquired a catalog_xmin, it doesn't let go of
it, even when invalidated by exceeding the max_slot_wal_keep_size, which
means that dead catalog tuples are not removed by vacuum anymore since
the point is invalidated, until the slot is dropped.  This could be
catastrophic if catalog churn is high.

Change the computation of Xmin to ignore invalidated slots,
to prevent dead rows from accumulating.

Backpatch to 13, where slot invalidation appeared.

Author: Sirisha Chamarthi <sirichamarthi22@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://postgr.es/m/CAKrAKeUEDeqquN9vwzNeG-CN8wuVsfRYbeOUV9qKO_RHok=j+g@mail.gmail.com
2022-11-22 10:56:07 +01:00
..
access Fix cleanup lock acquisition in SPLIT_ALLOCATE_PAGE replay. 2022-11-14 10:32:47 +05:30
backup Message style improvements 2022-09-24 18:38:35 -04:00
bootstrap Process session_preload_libraries within InitPostgres's transaction. 2022-07-25 10:27:43 -04:00
catalog Avoid crash after function syntax error in a replication worker. 2022-11-03 12:01:57 -04:00
commands Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31. 2022-11-04 10:39:52 -04:00
executor Fix MERGE tuple count with DO NOTHING 2022-11-17 18:56:11 +01:00
foreign Rename SetSingleFuncCall() to InitMaterializedSRF() 2022-10-18 10:22:40 +09:00
jit Track LLVM 15 changes. 2022-10-19 22:18:54 +13:00
lib Fix lock assertions in dshash.c. 2022-07-11 16:01:22 +12:00
libpq Remove misguided SSL key file ownership check in libpq. 2022-05-26 14:14:05 -04:00
main Fix outdated --help message for postgres -f 2022-08-15 13:37:32 +09:00
nodes Fix pg_stat_statements for MERGE 2022-09-27 10:44:42 +02:00
optimizer Update some comments that should've covered MERGE 2022-10-24 12:52:43 +02:00
parser Fix CREATE DATABASE so we can pg_upgrade DBs with OIDs above 2^31. 2022-11-04 10:39:52 -04:00
partitioning Small cleanup of create_list_bounds() 2022-07-13 17:01:39 +12:00
po Translation updates 2022-11-07 19:22:54 +01:00
port Ensure that the argument of shmdt(2) is declared "void *". 2022-02-15 17:17:28 -05:00
postmaster Rework shutdown callback of archiver modules 2022-10-19 14:07:01 +09:00
regex Defend against stack overrun in a few more places. 2022-08-24 13:02:19 -04:00
replication Ignore invalidated slots while computing oldest catalog Xmin 2022-11-22 10:56:07 +01:00
rewrite Reject non-ON-SELECT rules that are named "_RETURN". 2022-10-17 12:14:39 -04:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Partially undo commit 94da73281. 2022-08-05 15:57:46 -04:00
storage Ignore invalidated slots while computing oldest catalog Xmin 2022-11-22 10:56:07 +01:00
tcop Force immediate commit after CREATE DATABASE etc in extended protocol. 2022-07-26 13:07:03 -04:00
tsearch Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. 2022-11-21 17:07:07 -05:00
utils Add comments and a missing CHECK_FOR_INTERRUPTS in ts_headline. 2022-11-21 17:07:07 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Move basebackup code to new directory src/backend/backup 2022-08-10 14:03:09 -04:00
nls.mk Translation updates 2022-11-07 14:04:05 +01:00