diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2019-04-12 08:36:05 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2019-04-12 08:36:05 +0200 |
commit | ef6f30fe77af69a8c775cca82bf993b10c9889ee (patch) | |
tree | 318e3cc237fc57035c4d63ee766e110845b01d75 /src/include | |
parent | f7feb020c3d8d5aff24204af28359b99ee65bf8f (diff) |
Fix REINDEX CONCURRENTLY of partitions
In case of a partition index, when swapping the old and new index, we
also need to attach the new index as a partition and detach the old
one. Also, to handle partition indexes, we not only need to change
dependencies referencing the index, but also dependencies of the index
referencing something else. The previous code did this only
specifically for a constraint, but we also need to do this for
partitioned indexes. So instead write a generic function that does it
for all dependencies.
Author: Michael Paquier <michael@paquier.xyz>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/flat/DF4PR8401MB11964EDB77C860078C343BEBEE5A0%40DF4PR8401MB1196.NAMPRD84.PROD.OUTLOOK.COM#154df1fedb735190a773481765f7b874
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/dependency.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/catalog/dependency.h b/src/include/catalog/dependency.h index 4f9dde9df9d..57545b70d88 100644 --- a/src/include/catalog/dependency.h +++ b/src/include/catalog/dependency.h @@ -199,6 +199,9 @@ extern long changeDependencyFor(Oid classId, Oid objectId, Oid refClassId, Oid oldRefObjectId, Oid newRefObjectId); +extern long changeDependenciesOf(Oid classId, Oid oldObjectId, + Oid newObjectId); + extern long changeDependenciesOn(Oid refClassId, Oid oldRefObjectId, Oid newRefObjectId); |