pgsql: Fix CommandCounterIncrement in partition-related DDL

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Date: 2018-03-20T14:37:36Z
Lists: pgsql-hackers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4dba331cb3dc1b5ffb0680ed8efae847de216796

Modified Files
--------------
src/backend/catalog/heap.c       | 3 +++
src/backend/commands/indexcmds.c | 3 +++
src/backend/commands/tablecmds.c | 9 ---------
3 files changed, 6 insertions(+), 9 deletions(-)

Commits

  1. Fix relcache handling of the 'default' partition

  2. Fix CommandCounterIncrement in partition-related DDL