mirror of https://github.com/citusdata/citus.git
Merge pull request #3539 from citusdata/unlogged_merge_tables
Make merge tables during re-partitioning unloggedpull/3485/head^2
commit
1b6020e2d6
|
@ -464,12 +464,11 @@ CreateTaskTable(StringInfo schemaName, StringInfo relationName,
|
||||||
Assert(schemaName != NULL);
|
Assert(schemaName != NULL);
|
||||||
Assert(relationName != 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);
|
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);
|
List *columnDefinitionList = ColumnDefinitionList(columnNameList, columnTypeList);
|
||||||
|
|
||||||
CreateStmt *createStatement = CreateStatement(relation, columnDefinitionList);
|
CreateStmt *createStatement = CreateStatement(relation, columnDefinitionList);
|
||||||
|
|
Loading…
Reference in New Issue