postgresql/src/backend/utils
Noah Misch 560124a37c 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
..
adt Fix corner-case loss of precision in numeric_power(). 2021-10-06 13:23:13 +01:00
cache Fix CREATE INDEX CONCURRENTLY for the newest prepared transactions. 2021-10-23 18:36:43 -07:00
error Disallow setting client_min_messages higher than ERROR. 2018-11-08 17:33:46 -05:00
fmgr Fix broken ruleutils support for function TRANSFORM clauses. 2021-01-25 13:03:11 -05:00
hash Remove broken and useless entry-count printing in HASH_DEBUG code. 2017-08-02 12:17:08 -04:00
init Fix postmaster's behavior during smart shutdown. 2020-08-14 13:26:57 -04:00
mb Avoid unnecessary out-of-memory errors during encoding conversion. 2019-10-03 17:34:26 -04:00
misc Set pg_setting.pending_restart when pertinent config lines are removed 2021-07-27 15:44:12 -04:00
mmgr Adjust DSM and DSA slot usage constants (back-patch). 2020-11-20 10:53:08 +13:00
resowner Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
sort Robustify tuplesort's free_sort_tuple function 2021-07-13 13:31:29 +12:00
time Fix misc typos, mostly in comments. 2018-07-18 16:18:27 +03:00
.gitignore Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
errcodes.txt Revert to 9.6 treatment of ALTER TYPE enumtype ADD VALUE. 2017-09-27 16:14:37 -04:00
Gen_dummy_probes.pl Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Gen_dummy_probes.sed Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Gen_fmgrtab.pl Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
generate-errcodes.pl Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
Makefile Fix make rules that generate multiple output files. 2018-03-23 13:45:38 -04:00
probes.d Rename dtrace probes for ongoing xlog -> wal conversion. 2017-02-09 16:40:19 -05:00