diff options
author | Michael Paquier <michael@paquier.xyz> | 2019-10-28 11:57:31 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2019-10-28 11:57:31 +0900 |
commit | 68ac9cf2499236996f3d4bf31f7f16d5bd3c77af (patch) | |
tree | 20b19d8103fe57347eb9ea29d6cc77657361ae7f /src/backend/utils/adt/jsonfuncs.c | |
parent | 51970fa8df9b32b5501ca1cb9d5b805894c1e064 (diff) | |
download | postgresql-68ac9cf2499236996f3d4bf31f7f16d5bd3c77af.tar.gz postgresql-68ac9cf2499236996f3d4bf31f7f16d5bd3c77af.zip |
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 on 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 partition indexes.
Author: Michael Paquier
Discussion: https://postgr.es/m/20191025064318.GF8671@paquier.xyz
Backpatch-through: 12
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions