From 52b70b1c7df5929465cf3dd8f4798e6f2e204f61 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 13 Nov 2018 08:59:41 +0900 Subject: [PATCH] Remove CommandCounterIncrement() after processing ON COMMIT DELETE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This comes from f9b5b41, which is part of one the original commits that implemented ON COMMIT actions. By looking at the truncation code, any CCI needed happens locally when rebuilding indexes, so it looks safe to just remove this final incrementation. Author: Michael Paquier Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20181109024731.GF2652@paquier.xyz --- src/backend/commands/tablecmds.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 82989158ee..946119fa86 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -13334,10 +13334,8 @@ PreCommit_on_commit_actions(void) * exists at truncation time. */ if (oids_to_truncate != NIL) - { heap_truncate(oids_to_truncate); - CommandCounterIncrement(); /* XXX needed? */ - } + if (oids_to_drop != NIL) { ObjectAddresses *targetObjects = new_object_addresses();