postgresql/src/backend
Peter Eisentraut cd3e27464c Fix potential catalog corruption with temporary identity columns
If a temporary table with an identity column and ON COMMIT DROP is
created in a single-statement transaction (not useful, but allowed),
it would leave the catalog corrupted.  We need to add a
CommandCounterIncrement() so that PreCommit_on_commit_actions() sees
the created dependency between table and sequence and can clean it
up.

The analogous and more useful case of doing this in a transaction
block already runs some CommandCounterIncrement() before it gets to
the on-commit cleanup, so it wasn't a problem in practical use.

Several locations for placing the new CommandCounterIncrement() call
were discussed.  This patch places it at the end of
standard_ProcessUtility().  That would also help if other commands
were to create catalog entries that some on-commit action would like
to see.

Bug: #15631
Reported-by: Serge Latyntsev <dnsl48@gmail.com>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
2019-04-29 08:49:03 +02:00
..
access Allow pg_class xid & multixid horizons to not be set. 2019-04-23 21:42:12 -07:00
bootstrap Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
catalog Avoid order-of-execution problems with ALTER TABLE ADD PRIMARY KEY. 2019-04-23 12:25:27 -04:00
commands Apply stopgap fix for bug #15672. 2019-04-26 17:18:07 -04:00
executor Fix slot type issue for fuzzy distance index scan over out-of-core table AM. 2019-04-19 11:42:37 -07:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Fix collection of typos and grammar mistakes in docs and comments 2019-04-19 16:57:40 +09:00
lib Fix example in comment. 2019-04-09 08:33:42 +03:00
libpq Clean up minor warnings from buildfarm. 2019-04-28 12:45:55 -04:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
optimizer Fix collection of typos and grammar mistakes in docs and comments 2019-04-19 16:57:40 +09:00
parser Fix tablespace inheritance for partitioned rels 2019-04-25 10:31:32 -04:00
partitioning Fix failure with textual partition hash keys. 2019-04-15 16:47:09 -04:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Consistently test for in-use shared memory. 2019-04-12 22:36:38 -07:00
postmaster Use preprocessor conditions compatible with Emacs indent. 2019-04-28 12:56:53 -07:00
regex Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
replication Fix thinko introduced by 82a5649 in slot.c 2019-04-17 10:01:22 +09:00
rewrite Perform RLS subquery checks as the right user when going via a view. 2019-04-02 08:13:59 +01:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Fix mvdistinct and dependencies size calculations 2019-04-21 20:23:34 +02:00
storage Fix function names in comments. 2019-04-25 23:43:48 +09:00
tcop Fix potential catalog corruption with temporary identity columns 2019-04-29 08:49:03 +02:00
tsearch Fix more strcmp() calls using boolean-like comparisons for result checks 2019-04-12 10:16:49 +09:00
utils Clean up minor warnings from buildfarm. 2019-04-28 12:45:55 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00