forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit590a870
committed
Ignore attempts to add TOAST table to shared or catalog tables
Running ALTER TABLE on any table will check if a TOAST table needs to beadded. On shared tables, this would previously fail, thus effectivelydisabling ALTER TABLE for those tables. On (non-shared) systemcatalogs, on the other hand, it would add a TOAST table, even though wedon't really want TOAST tables on some system catalogs. In some cases,it would also fail with an error "AccessExclusiveLock required to addtoast table.", depending on what locks the ALTER TABLE actions hadalready taken.So instead, just ignore attempts to add TOAST tables to such tables,outside of bootstrap mode, pretending they don't need one.This allows running ALTER TABLE on such tables without messing up theTOAST situation. Legitimate uses for ALTER TABLE on system catalogsinclude setting reloptions (say, fillfactor or autovacuum settings).(All this still requires allow_system_table_mods, which is independentof this.)Discussion:https://www.postgresql.org/message-id/flat/e49f825b-fb25-0bc8-8afc-d5ad895c7975@2ndquadrant.com1 parente537ac5 commit590a870
1 file changed
+26
-16
lines changedLines changed: 26 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
146 | 147 |
| |
147 | 148 |
| |
148 | 149 |
| |
149 |
| - | |
150 |
| - | |
151 |
| - | |
152 |
| - | |
153 |
| - | |
154 |
| - | |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
162 |
| - | |
163 |
| - | |
164 | 150 |
| |
165 | 151 |
| |
166 | 152 |
| |
| |||
260 | 246 |
| |
261 | 247 |
| |
262 | 248 |
| |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
263 | 255 |
| |
264 | 256 |
| |
265 | 257 |
| |
| |||
398 | 390 |
| |
399 | 391 |
| |
400 | 392 |
| |
401 |
| - | |
402 | 393 |
| |
403 | 394 |
| |
404 | 395 |
| |
| |||
410 | 401 |
| |
411 | 402 |
| |
412 | 403 |
| |
| 404 | + | |
| 405 | + | |
| 406 | + | |
413 | 407 |
| |
414 | 408 |
| |
415 | 409 |
| |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
416 | 426 |
| |
417 | 427 |
| |
418 | 428 |
| |
|
0 commit comments
Comments
(0)