forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54b208f
committed
Ensure we have a snapshot while dropping ON COMMIT DROP temp tables.
Dropping a temp table could entail TOAST table access to clean outtoasted catalog entries, such as large pg_constraint.conbin stringsfor complex CHECK constraints. If we did that via ON COMMIT DROP,we triggered the assertion in init_toast_snapshot(), becausethere was no provision for setting up a snapshot for the dropactions. Fix that.(I assume here that the adjacent truncation actions for ON COMMITDELETE ROWS don't have a similar problem: it doesn't seem likenontransactional truncations would need to touch any toasted fields.If that proves wrong, we could refactor a bit to have the samesnapshot acquisition cover that too.)The test case added here does not fail before v15, because thatassertion was added in2776922 which was not back-patched.However, the race condition the assertion warns of surelyexists further back, so back-patch to all supported branches.Per report from Richard Guo.Discussion:https://postgr.es/m/CAMbWs4-x26=_QxxgdJyNbiCDzvtr2WV5ZDso_v-CukKEe6cBZw@mail.gmail.com1 parent8fb13dd commit54b208f
File tree
3 files changed
+44
-0
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+44
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17644 | 17644 | | |
17645 | 17645 | | |
17646 | 17646 | | |
| 17647 | + | |
| 17648 | + | |
| 17649 | + | |
| 17650 | + | |
| 17651 | + | |
| 17652 | + | |
17647 | 17653 | | |
17648 | 17654 | | |
17649 | 17655 | | |
17650 | 17656 | | |
17651 | 17657 | | |
17652 | 17658 | | |
17653 | 17659 | | |
| 17660 | + | |
| 17661 | + | |
17654 | 17662 | | |
17655 | 17663 | | |
17656 | 17664 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
104 | 120 | | |
105 | 121 | | |
106 | 122 | | |
| |||
0 commit comments
Comments
(0)