forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd3e274
committed
Fix potential catalog corruption with temporary identity columns
If a temporary table with an identity column and ON COMMIT DROP iscreated in a single-statement transaction (not useful, but allowed),it would leave the catalog corrupted. We need to add aCommandCounterIncrement() so that PreCommit_on_commit_actions() seesthe created dependency between table and sequence and can clean itup.The analogous and more useful case of doing this in a transactionblock already runs some CommandCounterIncrement() before it gets tothe on-commit cleanup, so it wasn't a problem in practical use.Several locations for placing the new CommandCounterIncrement() callwere discussed. This patch places it at the end ofstandard_ProcessUtility(). That would also help if other commandswere to create catalog entries that some on-commit action would liketo see.Bug: #15631Reported-by: Serge Latyntsev <dnsl48@gmail.com>Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>Reviewed-by: Michael Paquier <michael@paquier.xyz>1 parentc3f67ed commitcd3e274
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
931 | 931 |
| |
932 | 932 |
| |
933 | 933 |
| |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
934 | 941 |
| |
935 | 942 |
| |
936 | 943 |
| |
|
0 commit comments
Comments
(0)