postgresql/src/backend
Heikki Linnakangas f217c41055 Fix catcache invalidation of a list entry that's being built
If a new catalog tuple is inserted that belongs to a catcache list
entry, and cache invalidation happens while the list entry is being
built, the list entry might miss the newly inserted tuple.

To fix, change the way we detect concurrent invalidations while a
catcache entry is being built. Keep a stack of entries that are being
built, and apply cache invalidation to those entries in addition to
the real catcache entries. This is similar to the in-progress list in
relcache.c.

Back-patch to all supported versions. (This commit to v13 a few hours
later than other branches, because I somehow missed v13 in the first
batch.)

Reviewed-by: Noah Misch
Discussion: https://www.postgresql.org/message-id/2234dc98-06fe-42ed-b5db-ac17384dc880@iki.fi
2025-01-14 18:54:56 +02:00
..
access Fix potential integer overflow in bringetbitmap() 2025-01-14 15:13:20 +09:00
bootstrap Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
catalog Restore smgrtruncate() prototype in back-branches. 2025-01-08 10:48:57 +13:00
commands In REASSIGN OWNED of a database, lock the tuple as mandated. 2024-12-28 07:16:27 -08:00
executor Fix Assert failure in WITH RECURSIVE UNION queries 2024-12-19 13:13:51 +13:00
foreign Restrict accesses to non-system views and foreign tables during pg_dump. 2024-08-05 06:05:20 -07:00
jit Fix NULLIF()'s handling of read-write expanded objects. 2024-11-25 18:09:11 -05:00
lib Accommodate very large dshash tables. 2024-12-17 15:24:45 -06:00
libpq Fix HBA option count 2025-01-12 23:44:39 +01:00
main Fix elog(FATAL) before PostmasterMain() or just after fork(). 2024-12-10 13:52:02 -08:00
nodes Further fixes for MULTIEXPR_SUBLINK fix. 2022-09-06 16:38:18 -04:00
optimizer Compare collations before merging UNION operations. 2024-11-19 18:26:19 -05:00
parser Remove incorrect Assert. 2024-09-11 11:42:19 -04:00
partitioning Fix creation of partition descriptor during concurrent detach+drop 2024-08-12 18:17:56 -04:00
po Translation updates 2024-11-11 13:58:30 +01:00
port Check for STATUS_DELETE_PENDING on Windows. 2024-11-08 09:44:46 +10:30
postmaster Back-patch b1ffe3ff into REL_13_STABLE. 2025-01-09 10:14:11 +13:00
regex Fix recently-exposed portability issue in regex optimization. 2024-11-17 14:14:06 -05:00
replication Fix memory leak in pgoutput with relation attribute map 2025-01-08 08:47:24 +09:00
rewrite Ensure cached plans are correctly marked as dependent on role. 2024-11-11 09:00:00 -06:00
snowball In the Snowball dictionary, don't try to stem excessively-long words. 2022-08-31 10:42:05 -04:00
statistics Fix incorrectly reported stats kind in "can't happen" ERROR 2024-03-05 16:19:05 +13:00
storage Fix C error reported by Oracle compiler. 2025-01-08 17:14:15 +13:00
tcop Simplify executor's determination of whether to use parallelism. 2024-12-09 14:38:19 -05:00
tsearch Limit to_tsvector_byid's initial array allocation to something sane. 2023-09-25 11:50:28 -04:00
utils Fix catcache invalidation of a list entry that's being built 2025-01-14 18:54:56 +02: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 Update copyrights for 2020 2020-01-01 12:21:45 -05:00
nls.mk Translation updates 2020-09-14 13:14:53 +02:00