diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-05-07 22:58:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-05-07 22:58:28 +0000 |
commit | 1e06ed1abe6244573683dd1220042c8f06112ed0 (patch) | |
tree | 46d1ac63bb10b990fe705aea4ea4d08f574cd82f /src/backend/tcop/utility.c | |
parent | 48caf91b66fda69ffaf0d0aeb54ee41c6727ea2d (diff) |
Add an option to AlterTableCreateToastTable() to allow its caller to force
a toast table to be built, even if the sum-of-column-widths calculation
indicates one isn't needed. This is needed by pg_migrator because if the
old table has a toast table, we have to migrate over the toast table since
it might contain some live data, even though subsequent column drops could
mean that no recently-added rows could require toasting.
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 6c6b13e17ef..63aca25ebdf 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.306 2009/02/02 19:31:39 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.307 2009/05/07 22:58:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -442,10 +442,13 @@ ProcessUtility(Node *parsetree, "toast", validnsps, true, false); - (void) heap_reloptions(RELKIND_TOASTVALUE, toast_options, + (void) heap_reloptions(RELKIND_TOASTVALUE, + toast_options, true); - AlterTableCreateToastTable(relOid, toast_options); + AlterTableCreateToastTable(relOid, + toast_options, + false); } else { |