postgresql/src/include/utils
Noah Misch 5141e471b3 Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY.
CIC and REINDEX CONCURRENTLY assume backends see their catalog changes
no later than each backend's next transaction start.  That failed to
hold when a backend absorbed a relevant invalidation in the middle of
running RelationBuildDesc() on the CIC index.  Queries that use the
resulting index can silently fail to find rows.  Fix this for future
index builds by making RelationBuildDesc() loop until it finishes
without accepting a relevant invalidation.  It may be necessary to
reindex to recover from past occurrences; REINDEX CONCURRENTLY suffices.
Back-patch to 9.6 (all supported versions).

Noah Misch and Andrey Borodin, reviewed (in earlier versions) by Andres
Freund.

Discussion: https://postgr.es/m/20210730022548.GA1940096@gust.leadboat.com
2021-10-23 18:36:43 -07:00
..
.gitignore Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
acl.h Fix missing role dependencies for some schema and type ACLs. 2018-11-09 20:42:03 -05:00
aclchk_internal.h Replace GrantObjectType with ObjectType 2018-01-19 14:01:14 -05:00
array.h Prevent integer overflows in array subscripting calculations. 2021-05-10 10:44:38 -04:00
arrayaccess.h Don't read fields of a misaligned ExpandedObjectHeader or AnyArrayType. 2019-06-30 17:34:20 -07:00
ascii.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
attoptcache.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
backend_random.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
builtins.h Fix some corner-case issues in REFRESH MATERIALIZED VIEW CONCURRENTLY. 2018-03-19 18:50:05 -04:00
bytea.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
cash.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catcache.h Save a few bytes by removing useless last argument to SearchCatCacheList. 2018-01-29 15:13:17 -05:00
combocid.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
date.h Reject "23:59:60.nnn" in datetime input. 2020-06-04 16:42:08 -04:00
datetime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
datum.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
dsa.h Use size_t consistently in dsa.{ch}. 2018-09-22 00:41:49 +12:00
dynahash.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
dynamic_loader.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
elog.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
evtcache.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
expandeddatum.h Don't read fields of a misaligned ExpandedObjectHeader or AnyArrayType. 2019-06-30 17:34:20 -07:00
expandedrecord.h Detoast plpgsql variables if they might live across a transaction boundary. 2018-05-16 14:56:52 -04:00
fmgrtab.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
formatting.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
freepage.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
geo_decls.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
guc.h Teach SHOW ALL to honor pg_read_all_settings membership 2018-06-08 16:19:05 -04:00
guc_tables.h Split out documentation of SSL parameters into their own section 2018-01-23 07:11:38 -05:00
hashutils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
help_config.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
hsearch.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
index_selfuncs.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
inet.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
int8.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
inval.h Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. 2021-10-23 18:36:43 -07:00
json.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
jsonapi.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
jsonb.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
logtape.h Fix some sloppiness in the new BufFileSize() and BufFileAppend() functions. 2018-05-02 17:23:13 +03:00
lsyscache.h Preserve clustered index after rewrites with ALTER TABLE 2020-04-06 11:05:54 +09:00
memdebug.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
memutils.h Simplify use of AllocSetContextCreate() wrapper macro. 2018-10-12 14:26:56 -04:00
nabstime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
numeric.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
palloc.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
partcache.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
pg_crc.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_locale.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_lsn.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_rusage.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pidfile.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
plancache.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
portal.h Fix Portal snapshot tracking to handle subtransactions properly. 2021-10-01 11:10:12 -04:00
ps_status.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
queryenvironment.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rangetypes.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
regproc.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rel.h Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
relcache.h Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. 2021-10-23 18:36:43 -07:00
relfilenodemap.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
relmapper.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
relptr.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
reltrigger.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
resowner.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
resowner_private.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
rls.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
ruleutils.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
sampling.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
selfuncs.h Add prefix operator for TEXT type. 2018-04-03 19:46:45 +03:00
sharedtuplestore.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
snapmgr.h Fix Portal snapshot tracking to handle subtransactions properly. 2021-10-01 11:10:12 -04:00
snapshot.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
sortsupport.h Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
spccache.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
syscache.h Save a few bytes by removing useless last argument to SearchCatCacheList. 2018-01-29 15:13:17 -05:00
timeout.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
timestamp.h Fix and simplify some usages of TimestampDifference(). 2020-11-10 22:51:56 -05:00
tqual.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
tuplesort.h Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
tuplestore.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
typcache.h Make plpgsql use its DTYPE_REC code paths for composite-type variables. 2018-02-13 18:52:21 -05:00
tzparser.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
uuid.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
varbit.h Fix failure to zero-pad the result of bitshiftright(). 2019-09-22 17:46:00 -04:00
varlena.h Further fixes for quoted-list GUC values in pg_dump and ruleutils.c. 2018-07-31 13:00:08 -04:00
xml.h Update copyright for 2018 2018-01-02 23:30:12 -05:00