-
- Downloads
Fix toast table creation.
Instead of using slightly-too-clever heuristics to decide when we must create a TOAST table, just check whether one is needed every time the table is altered. Checking whether a toast table is needed is cheap enough that we needn't worry about doing it on every ALTER TABLE command, and the previous coding is apparently prone to accidental breakage: commit 04e17bae broken ALTER TABLE .. SET STORAGE, which moved some actions from AT_PASS_COL_ATTRS to AT_PASS_MISC, and commit 6c572399 broke ALTER TABLE .. ADD COLUMN by changing the way that adding columns recurses into child tables. Noah Misch, with one comment change by me
Showing
- src/backend/catalog/toasting.c 5 additions, 5 deletionssrc/backend/catalog/toasting.c
- src/backend/commands/tablecmds.c 2 additions, 8 deletionssrc/backend/commands/tablecmds.c
- src/test/regress/expected/alter_table.out 13 additions, 0 deletionssrc/test/regress/expected/alter_table.out
- src/test/regress/input/misc.source 6 additions, 0 deletionssrc/test/regress/input/misc.source
- src/test/regress/output/misc.source 11 additions, 0 deletionssrc/test/regress/output/misc.source
- src/test/regress/sql/alter_table.sql 10 additions, 0 deletionssrc/test/regress/sql/alter_table.sql
Loading
Please register or sign in to comment