postgresql/src/include/utils
Heikki Linnakangas ce7c406f0f 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.

Reviewed-by: Noah Misch
Discussion: https://www.postgresql.org/message-id/2234dc98-06fe-42ed-b5db-ac17384dc880@iki.fi
2025-01-14 14:29:11 +02:00
..
.gitignore Revert "Add gitignore entries for jsonpath_gram.h" 2019-03-23 00:19:34 +01:00
acl.h Allow granting SET and ALTER SYSTEM privileges on GUC parameters. 2022-04-06 13:24:33 -04:00
aclchk_internal.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
array.h Detect integer overflow while computing new array dimensions. 2023-11-06 10:56:43 -05:00
arrayaccess.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ascii.h Move is_valid_ascii() to ascii.h. 2024-01-29 12:09:08 -06:00
attoptcache.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
backend_progress.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
backend_status.h pgstat: stats collector references in comments. 2022-04-06 13:56:06 -07:00
builtins.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
bytea.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Fix catcache invalidation of a list entry that's being built 2025-01-14 14:29:11 +02:00
combocid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
date.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
datetime.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
datum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsa.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dynahash.h Fix various typos, grammar and code style in comments and docs 2022-01-25 09:40:04 +09:00
elog.h Avoid calling proc_exit() in processes forked by system(). 2023-10-17 10:42:06 -05:00
evtcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandeddatum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
expandedrecord.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
float.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgrtab.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
formatting.h Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
freepage.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
geo_decls.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
guc.h Allow adjusting session_authorization and role in parallel workers. 2024-08-10 15:51:28 -04:00
guc_tables.h Be more wary about NULL values for GUC string variables. 2023-11-02 11:47:33 -04:00
help_config.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
hsearch.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
index_selfuncs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inet.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
inval.h Revert "For inplace update, send nontransactional invalidations." 2024-11-02 09:05:04 -07:00
json.h Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
jsonb.h Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
jsonfuncs.h Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
jsonpath.h Revert SQL/JSON features 2022-09-01 17:10:42 -04:00
logtape.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
lsyscache.h Revert "Fix parallel-safety check of expressions and predicate for index builds" 2024-03-07 08:31:04 +09:00
memdebug.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
memutils.h Improve the generation memory allocator 2022-04-04 20:53:13 +12:00
multirangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
numeric.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
old_snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
palloc.h Expand palloc/pg_malloc API for more type safety 2022-09-14 06:04:24 +02:00
partcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_crc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_locale.h Fix t_isspace(), etc., when datlocprovider=i and datctype=C. 2023-03-17 12:07:47 -07:00
pg_lsn.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_rusage.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat_internal.h Fix race conditions with drop of reused pgstats entries 2024-11-15 11:32:18 +09:00
pidfile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
plancache.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
portal.h Simplify executor's determination of whether to use parallelism. 2024-12-09 14:38:19 -05:00
ps_status.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
queryenvironment.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
queryjumble.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
rangetypes.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
regproc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rel.h Make our back branches build under -fkeep-inline-functions. 2023-01-20 11:58:12 -05:00
relcache.h Revert changes in HOT handling of BRIN indexes 2022-06-16 15:02:49 +02:00
relfilenodemap.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relmapper.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
relptr.h Fix relptr's encoding of the base address. 2022-06-27 11:34:26 +12:00
reltrigger.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
resowner_private.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rls.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
ruleutils.h pageinspect: Fix gist_page_items() with included columns 2023-05-19 12:38:15 +09:00
sampling.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
selfuncs.h Revert "Optimize order of GROUP BY keys". 2022-10-03 10:56:16 -04:00
sharedtuplestore.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
snapmgr.h Make our back branches build under -fkeep-inline-functions. 2023-01-20 11:58:12 -05:00
snapshot.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sortsupport.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
spccache.h Add missing 'extern' to function prototypes. 2022-05-12 12:39:33 -07:00
syscache.h For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:23 -07:00
timeout.h pgstat: store statistics in shared memory. 2022-04-06 21:29:46 -07:00
timestamp.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
tuplesort.h Fix outdated comment in tuplesort.h 2022-11-02 15:29:49 +13:00
tuplestore.h Remove all traces of tuplestore_donestoring() in the C code 2022-02-17 09:52:02 +09:00
typcache.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
tzparser.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
uuid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varbit.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
varlena.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
wait_event.h Sync PG_VERSION file in CREATE DATABASE. 2024-02-01 13:44:23 -08:00
xid8.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
xml.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00