diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-03-20 11:19:41 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2018-03-20 11:19:41 -0300 |
commit | 4dba331cb3dc1b5ffb0680ed8efae847de216796 (patch) | |
tree | 1d415d5c202c32c077e3f219c205cc83d8b35291 /src/backend/commands/indexcmds.c | |
parent | 467963c3e9c5ba9a953959f8aebcdd7206188a18 (diff) | |
download | postgresql-4dba331cb3dc1b5ffb0680ed8efae847de216796.tar.gz postgresql-4dba331cb3dc1b5ffb0680ed8efae847de216796.zip |
Fix CommandCounterIncrement in partition-related DDL
It makes sense to do the CCIs in the places that do catalog updates,
rather than before the places that error out because the former ones
fail to do it. In particular, it looks like StorePartitionBound() and
IndexSetParentIndex() ought to make their own CCIs.
Per review comments from Peter Eisentraut for row-level triggers on
partitioned tables.
Discussion: https://postgr.es/m/20171229225319.ajltgss2ojkfd3kp@alvherre.pgsql
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index ff40683d066..0a2ab500238 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -2512,5 +2512,8 @@ IndexSetParentIndex(Relation partitionIdx, Oid parentOid) recordDependencyOn(&partIdx, &partitionTbl, DEPENDENCY_AUTO); } + + /* make our updates visible */ + CommandCounterIncrement(); } } |