Merge pull request #3539 from citusdata/unlogged_merge_tables

Make merge tables during re-partitioning unlogged
pull/3485/head^2
Marco Slot 2020-02-26 10:55:15 +01:00 committed by GitHub
commit 1b6020e2d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -464,12 +464,11 @@ CreateTaskTable(StringInfo schemaName, StringInfo relationName,
Assert(schemaName != NULL);
Assert(relationName != NULL);
/*
* This new relation doesn't log to WAL, as the table creation and data copy
* statements occur in the same transaction. Still, we want to make the
* relation unlogged once we upgrade to PostgreSQL 9.1.
*/
RangeVar *relation = makeRangeVar(schemaName->data, relationName->data, -1);
/* this table will only exist for the duration of the query, avoid writing to WAL */
relation->relpersistence = RELPERSISTENCE_UNLOGGED;
List *columnDefinitionList = ColumnDefinitionList(columnNameList, columnTypeList);
CreateStmt *createStatement = CreateStatement(relation, columnDefinitionList);