postgresql/src
Michael Paquier 5e5f32284d Fix dependency handling at swap phase of REINDEX CONCURRENTLY
When swapping the dependencies of the old and new indexes, the code has
been correctly switching all links in pg_depend from the old to the new
index for both referencing and referenced entries.  However it forgot
the fact that the new index may itself have existing entries in
pg_depend, like references to the parent table attributes.  This
resulted in duplicated entries in pg_depend after running REINDEX
CONCURRENTLY.

Fix this problem by removing any existing entries in pg_depend for the
new index before switching the dependencies of the old index to the new
one.  More regression tests are added to check the consistency of
entries in pg_depend for indexes, including partitions.

Author: Michael Paquier
Discussion: https://postgr.es/m/20191025064318.GF8671@paquier.xyz
Backpatch-through: 12
2019-10-28 11:58:29 +09:00
..
backend Fix dependency handling at swap phase of REINDEX CONCURRENTLY 2019-10-28 11:58:29 +09:00
bin Fix initialization of fake LSN for unlogged relations 2019-10-27 13:54:20 +09:00
common In pg_log_generic(), be more paranoid about preserving errno. 2019-07-06 11:25:48 -04:00
fe_utils Fix parallel restore of FKs to partitioned tables 2019-10-17 09:58:01 +02:00
include For PowerPC instruction "addi", use constraint "b". 2019-10-18 20:20:31 -07:00
interfaces Get rid of useless/dangerous redefinition of bool in ECPG. 2019-10-25 12:17:41 -04:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Translation updates 2019-09-29 23:57:17 +02:00
port Deal with yet another issue related to "Norwegian (Bokmål)" locale. 2019-10-21 14:18:16 -04:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
test Fix dependency handling at swap phase of REINDEX CONCURRENTLY 2019-10-28 11:58:29 +09:00
timezone Update time zone data files to tzdata release 2019c. 2019-09-20 19:53:52 -04:00
tools Handle spaces in OpenSSL install location for MSVC 2019-10-04 15:39:27 -04:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:05:50 +02:00