postgresql/src/include/access
Noah Misch a5b9a0000e Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions.
The purpose of commit 8a54e12a38 was to
fix this, and it sufficed when the PREPARE TRANSACTION completed before
the CIC looked for lock conflicts.  Otherwise, things still broke.  As
before, in a cluster having used CIC while having enabled prepared
transactions, queries that use the resulting index can silently fail to
find rows.  It may be necessary to reindex to recover from past
occurrences; REINDEX CONCURRENTLY suffices.  Fix this for future index
builds by making CIC wait for arbitrarily-recent prepared transactions
and for ordinary transactions that may yet PREPARE TRANSACTION.  As part
of that, have PREPARE TRANSACTION transfer locks to its dummy PGPROC
before it calls ProcArrayClearTransaction().  Back-patch to 9.6 (all
supported versions).

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

Discussion: https://postgr.es/m/01824242-AA92-4FE9-9BA7-AEBAFFEA3D0C@yandex-team.ru
2021-10-23 18:36:42 -07:00
..
amapi.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
amvalidate.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
attmap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
attnum.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
brin.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
brin_internal.h Move IS [NOT] NULL handling from BRIN support functions 2021-03-23 00:45:42 +01:00
brin_page.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
brin_pageops.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
brin_revmap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
brin_tuple.h Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
brin_xlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
bufmask.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
clog.h Remove unused function prototypes. 2021-01-05 11:42:38 +13:00
commit_ts.h Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
detoast.h Allow configurable LZ4 TOAST compression. 2021-03-19 15:10:38 -04:00
genam.h Simplify state managed by VACUUM. 2021-04-05 13:21:44 -07:00
generic_xlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
gin.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
gin_private.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
ginblock.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
ginxlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
gist.h C comments: improve description of GiST NSN and GistBuildLSN 2021-03-10 17:03:10 -05:00
gist_private.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
gistscan.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
gistxlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
hash.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
hash_xlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
heapam.h Remove tupgone special case from vacuumlazy.c. 2021-04-06 08:49:22 -07:00
heapam_xlog.h Remove tupgone special case from vacuumlazy.c. 2021-04-06 08:49:22 -07:00
heaptoast.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
hio.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
htup.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
htup_details.h Rework HeapTupleHeader macros to reuse itemptr.h 2021-03-25 15:47:48 -03:00
itup.h Support INCLUDE'd columns in SP-GiST. 2021-04-05 18:41:21 -04:00
multixact.h Remove unused function prototypes. 2021-01-05 11:42:38 +13:00
nbtree.h Fix "single value strategy" index deletion issue. 2021-09-21 18:57:31 -07:00
nbtxlog.h Don't consider newly inserted tuples in nbtree VACUUM. 2021-03-10 16:27:01 -08:00
parallel.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
printsimple.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
printtup.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
relation.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
reloptions.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
relscan.h Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
rewriteheap.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
rmgr.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rmgrlist.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
sdir.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
session.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
skey.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
slru.h Prevent excess SimpleLruTruncate() deletion. 2021-01-16 12:21:35 -08:00
spgist.h Pass down "logically unchanged index" hint. 2021-01-13 08:11:00 -08:00
spgist_private.h Re-order pg_attribute columns to eliminate some padding space. 2021-05-23 12:12:09 -04:00
spgxlog.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
stratnum.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
subtrans.h Remove unused function prototypes. 2021-01-05 11:42:38 +13:00
syncscan.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
sysattr.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
table.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tableam.h Simplify state managed by VACUUM. 2021-04-05 13:21:44 -07:00
timeline.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
toast_compression.h Rethink definition of pg_attribute.attcompression. 2021-05-27 13:24:27 -04:00
toast_helper.h Allow configurable LZ4 TOAST compression. 2021-03-19 15:10:38 -04:00
toast_internals.h Short-circuit slice requests that are for more than the object's size. 2021-03-22 14:01:20 -04:00
transam.h Reduce the range of OIDs reserved for genbki.pl. 2021-05-27 15:55:08 -04:00
tsmapi.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tupconvert.h Fix permission checks on constraint violation errors on partitions. 2021-02-08 11:01:51 +02:00
tupdesc.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tupdesc_details.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
tupmacs.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
twophase.h Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:42 -07:00
twophase_rmgr.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
valid.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
visibilitymap.h Split macros from visibilitymap.h into a separate header 2021-09-23 19:59:11 +03:00
visibilitymapdefs.h Split macros from visibilitymap.h into a separate header 2021-09-23 19:59:11 +03:00
xact.h Initial pgindent and pgperltidy run for v14. 2021-05-12 13:14:10 -04:00
xlog.h Document XLOG_INCLUDE_XID a little better 2021-09-21 19:47:53 -03:00
xlog_internal.h Fix WAL replay in presence of an incomplete record 2021-09-29 11:41:01 -03:00
xlogarchive.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
xlogdefs.h Revert "Avoid creating archive status ".ready" files too early" 2021-09-04 12:14:30 -04:00
xloginsert.h Update copyright for 2021 2021-01-02 13:06:25 -05:00
xlogreader.h Fix WAL replay in presence of an incomplete record 2021-09-29 11:41:01 -03:00
xlogrecord.h Document XLOG_INCLUDE_XID a little better 2021-09-21 19:47:53 -03:00
xlogutils.h Revert recovery prefetching feature. 2021-05-10 16:06:09 +12:00