postgresql/src/backend
Noah Misch df6158139f 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:43 -07:00
..
access Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:43 -07:00
bootstrap Revert "Skip WAL for new relfilenodes, under wal_level=minimal." 2020-03-22 09:24:13 -07:00
catalog Fix lookup error in extended stats ownership check 2021-08-31 18:42:11 +02:00
commands Invalidate partitions of table being attached/detached 2021-10-18 19:08:25 -03:00
executor Fix assignment to array of domain over composite. 2021-10-19 13:54:46 -04:00
foreign Remove bogus "extern" annotations on function definitions. 2018-02-19 12:07:44 -05:00
jit jit: Do not try to shut down LLVM state in case of LLVM triggered errors. 2021-09-13 18:26:18 -07:00
lib Fix typo in comment 2021-04-20 14:36:47 +02:00
libpq Set type identifier on BIO 2021-08-17 14:30:39 +02:00
main Update copyright for 2018 2018-01-02 23:30:12 -05:00
nodes Ensure that expandTableLikeClause() re-examines the same table. 2020-12-01 14:02:28 -05:00
optimizer Fix mis-planning of repeated application of a projection. 2021-05-31 12:03:00 -04:00
parser Remove bogus assertion in transformExpressionList(). 2021-10-19 11:35:15 -04:00
partitioning Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:24:51 +09:00
po Translation updates 2021-08-09 12:57:38 +02:00
port Make EXEC_BACKEND more convenient on macOS. 2021-08-13 11:10:49 +12:00
postmaster Revert "Avoid creating archive status ".ready" files too early" 2021-09-04 12:14:30 -04:00
regex Make pg_regexec() robust against out-of-range search_start. 2021-09-11 15:19:58 -04:00
replication Back-patch "Add parent table name in an error in reorderbuffer.c." 2021-10-21 09:59:33 +05:30
rewrite Fix rewriter to set hasModifyingCTE correctly on rewritten queries. 2021-09-08 12:05:43 -04:00
snowball Avoid unnecessary use of pg_strcasecmp for already-downcased identifiers. 2018-01-26 18:25:14 -05:00
statistics Release memory allocated by dependency_degree 2021-09-23 18:48:58 +02:00
storage Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:43 -07:00
tcop Fix Portal snapshot tracking to handle subtransactions properly. 2021-10-01 11:10:12 -04:00
tsearch Don't leak compiled regex(es) when an ispell cache entry is dropped. 2021-03-18 21:44:43 -04:00
utils Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:43 -07: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 Rearrange makefile rules for running Gen_fmgrtab.pl. 2018-05-03 17:54:18 -04:00
nls.mk Translation updates 2018-09-17 08:40:36 +02:00