diff -rpcd a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c *** a/src/backend/commands/tablecmds.c Tue Jul 22 04:12:31 2014 --- b/src/backend/commands/tablecmds.c Fri Aug 8 17:28:44 2014 *************** PreCommit_on_commit_actions(void) *** 10167,10173 **** /* Do nothing (there shouldn't be such entries, actually) */ break; case ONCOMMIT_DELETE_ROWS: ! oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid); break; case ONCOMMIT_DROP: { --- 10167,10180 ---- /* Do nothing (there shouldn't be such entries, actually) */ break; case ONCOMMIT_DELETE_ROWS: ! ! /* ! * If this transaction hasn't accessed any temporary ! * relations, we can skip truncating ON COMMIT DELETE ROWS ! * tables, as they must still be empty. ! */ ! if (MyXactAccessedTempRel) ! oids_to_truncate = lappend_oid(oids_to_truncate, oc->relid); break; case ONCOMMIT_DROP: {