mirror of https://github.com/citusdata/citus.git
Merge pull request #1633 from citusdata/fix_pg_11
Get PostgreSQL 11 build passing cr: @pykellopull/1662/head
commit
a8428dff01
|
@ -28,4 +28,5 @@ configure -whitespace
|
||||||
src/backend/distributed/utils/citus_outfuncs.c -citus-style
|
src/backend/distributed/utils/citus_outfuncs.c -citus-style
|
||||||
src/backend/distributed/utils/ruleutils_96.c -citus-style
|
src/backend/distributed/utils/ruleutils_96.c -citus-style
|
||||||
src/backend/distributed/utils/ruleutils_10.c -citus-style
|
src/backend/distributed/utils/ruleutils_10.c -citus-style
|
||||||
|
src/backend/distributed/utils/ruleutils_11.c -citus-style
|
||||||
src/include/distributed/citus_nodes.h -citus-style
|
src/include/distributed/citus_nodes.h -citus-style
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "distributed/remote_commands.h"
|
#include "distributed/remote_commands.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
#include "distributed/worker_transaction.h"
|
#include "distributed/worker_transaction.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "executor/executor.h"
|
#include "executor/executor.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
#include "nodes/execnodes.h"
|
#include "nodes/execnodes.h"
|
||||||
|
@ -635,7 +636,8 @@ EnsureRelationCanBeDistributed(Oid relationId, Var *distributionColumn,
|
||||||
if (distributionMethod == DISTRIBUTE_BY_HASH)
|
if (distributionMethod == DISTRIBUTE_BY_HASH)
|
||||||
{
|
{
|
||||||
Oid hashSupportFunction = SupportFunctionForColumn(distributionColumn,
|
Oid hashSupportFunction = SupportFunctionForColumn(distributionColumn,
|
||||||
HASH_AM_OID, HASHPROC);
|
HASH_AM_OID,
|
||||||
|
HASHSTANDARD_PROC);
|
||||||
if (hashSupportFunction == InvalidOid)
|
if (hashSupportFunction == InvalidOid)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION),
|
ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION),
|
||||||
|
@ -1284,7 +1286,7 @@ TupleDescColumnNameList(TupleDesc tupleDescriptor)
|
||||||
|
|
||||||
for (columnIndex = 0; columnIndex < tupleDescriptor->natts; columnIndex++)
|
for (columnIndex = 0; columnIndex < tupleDescriptor->natts; columnIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute currentColumn = tupleDescriptor->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(tupleDescriptor, columnIndex);
|
||||||
char *columnName = NameStr(currentColumn->attname);
|
char *columnName = NameStr(currentColumn->attname);
|
||||||
|
|
||||||
if (currentColumn->attisdropped)
|
if (currentColumn->attisdropped)
|
||||||
|
@ -1311,7 +1313,7 @@ RelationUsesIdentityColumns(TupleDesc relationDesc)
|
||||||
|
|
||||||
for (attributeIndex = 0; attributeIndex < relationDesc->natts; attributeIndex++)
|
for (attributeIndex = 0; attributeIndex < relationDesc->natts; attributeIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute attributeForm = relationDesc->attrs[attributeIndex];
|
Form_pg_attribute attributeForm = TupleDescAttr(relationDesc, attributeIndex);
|
||||||
|
|
||||||
if (attributeForm->attidentity != '\0')
|
if (attributeForm->attidentity != '\0')
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,7 @@
|
||||||
#include "distributed/remote_commands.h"
|
#include "distributed/remote_commands.h"
|
||||||
#include "distributed/resource_lock.h"
|
#include "distributed/resource_lock.h"
|
||||||
#include "distributed/shard_pruning.h"
|
#include "distributed/shard_pruning.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "executor/executor.h"
|
#include "executor/executor.h"
|
||||||
#include "nodes/makefuncs.h"
|
#include "nodes/makefuncs.h"
|
||||||
#include "tsearch/ts_locale.h"
|
#include "tsearch/ts_locale.h"
|
||||||
|
@ -334,7 +335,7 @@ CopyToExistingShards(CopyStmt *copyStatement, char *completionTag)
|
||||||
/* build the list of column names for remote COPY statements */
|
/* build the list of column names for remote COPY statements */
|
||||||
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute currentColumn = tupleDescriptor->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(tupleDescriptor, columnIndex);
|
||||||
char *columnName = NameStr(currentColumn->attname);
|
char *columnName = NameStr(currentColumn->attname);
|
||||||
|
|
||||||
if (currentColumn->attisdropped)
|
if (currentColumn->attisdropped)
|
||||||
|
@ -892,7 +893,7 @@ CanUseBinaryCopyFormat(TupleDesc tupleDescription)
|
||||||
|
|
||||||
for (columnIndex = 0; columnIndex < totalColumnCount; columnIndex++)
|
for (columnIndex = 0; columnIndex < totalColumnCount; columnIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute currentColumn = tupleDescription->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(tupleDescription, columnIndex);
|
||||||
Oid typeId = InvalidOid;
|
Oid typeId = InvalidOid;
|
||||||
char typeCategory = '\0';
|
char typeCategory = '\0';
|
||||||
bool typePreferred = false;
|
bool typePreferred = false;
|
||||||
|
@ -1231,7 +1232,7 @@ ColumnOutputFunctions(TupleDesc rowDescriptor, bool binaryFormat)
|
||||||
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
||||||
{
|
{
|
||||||
FmgrInfo *currentOutputFunction = &columnOutputFunctions[columnIndex];
|
FmgrInfo *currentOutputFunction = &columnOutputFunctions[columnIndex];
|
||||||
Form_pg_attribute currentColumn = rowDescriptor->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(rowDescriptor, columnIndex);
|
||||||
Oid columnTypeId = currentColumn->atttypid;
|
Oid columnTypeId = currentColumn->atttypid;
|
||||||
Oid outputFunctionId = InvalidOid;
|
Oid outputFunctionId = InvalidOid;
|
||||||
bool typeVariableLength = false;
|
bool typeVariableLength = false;
|
||||||
|
@ -1282,7 +1283,7 @@ AppendCopyRowData(Datum *valueArray, bool *isNullArray, TupleDesc rowDescriptor,
|
||||||
}
|
}
|
||||||
for (columnIndex = 0; columnIndex < totalColumnCount; columnIndex++)
|
for (columnIndex = 0; columnIndex < totalColumnCount; columnIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute currentColumn = rowDescriptor->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(rowDescriptor, columnIndex);
|
||||||
Datum value = valueArray[columnIndex];
|
Datum value = valueArray[columnIndex];
|
||||||
bool isNull = isNullArray[columnIndex];
|
bool isNull = isNullArray[columnIndex];
|
||||||
bool lastColumn = false;
|
bool lastColumn = false;
|
||||||
|
@ -1357,7 +1358,7 @@ AvailableColumnCount(TupleDesc tupleDescriptor)
|
||||||
|
|
||||||
for (columnIndex = 0; columnIndex < tupleDescriptor->natts; columnIndex++)
|
for (columnIndex = 0; columnIndex < tupleDescriptor->natts; columnIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute currentColumn = tupleDescriptor->attrs[columnIndex];
|
Form_pg_attribute currentColumn = TupleDescAttr(tupleDescriptor, columnIndex);
|
||||||
|
|
||||||
if (!currentColumn->attisdropped)
|
if (!currentColumn->attisdropped)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "distributed/relay_utility.h"
|
#include "distributed/relay_utility.h"
|
||||||
#include "distributed/transmit.h"
|
#include "distributed/transmit.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "libpq/libpq.h"
|
#include "libpq/libpq.h"
|
||||||
#include "libpq/pqformat.h"
|
#include "libpq/pqformat.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
|
@ -166,7 +167,7 @@ FileOpenForTransmit(const char *filename, int fileFlags, int fileMode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fileDesc = PathNameOpenFile((char *) filename, fileFlags, fileMode);
|
fileDesc = PathNameOpenFilePerm((char *) filename, fileFlags, fileMode);
|
||||||
if (fileDesc < 0)
|
if (fileDesc < 0)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode_for_file_access(),
|
ereport(ERROR, (errcode_for_file_access(),
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "distributed/multi_physical_planner.h"
|
#include "distributed/multi_physical_planner.h"
|
||||||
#include "distributed/multi_server_executor.h"
|
#include "distributed/multi_server_executor.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
#include "utils/timestamp.h"
|
#include "utils/timestamp.h"
|
||||||
|
|
||||||
|
@ -521,7 +522,7 @@ ManageTaskExecution(Task *task, TaskExecution *taskExecution,
|
||||||
int fileFlags = (O_APPEND | O_CREAT | O_RDWR | O_TRUNC | PG_BINARY);
|
int fileFlags = (O_APPEND | O_CREAT | O_RDWR | O_TRUNC | PG_BINARY);
|
||||||
int fileMode = (S_IRUSR | S_IWUSR);
|
int fileMode = (S_IRUSR | S_IWUSR);
|
||||||
|
|
||||||
int32 fileDescriptor = BasicOpenFile(filename, fileFlags, fileMode);
|
int32 fileDescriptor = BasicOpenFilePerm(filename, fileFlags, fileMode);
|
||||||
if (fileDescriptor >= 0)
|
if (fileDescriptor >= 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "distributed/multi_server_executor.h"
|
#include "distributed/multi_server_executor.h"
|
||||||
#include "distributed/pg_dist_partition.h"
|
#include "distributed/pg_dist_partition.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "storage/fd.h"
|
#include "storage/fd.h"
|
||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
#include "utils/hsearch.h"
|
#include "utils/hsearch.h"
|
||||||
|
@ -1340,7 +1341,7 @@ ManageTransmitExecution(TaskTracker *transmitTracker,
|
||||||
int fileFlags = (O_APPEND | O_CREAT | O_RDWR | O_TRUNC | PG_BINARY);
|
int fileFlags = (O_APPEND | O_CREAT | O_RDWR | O_TRUNC | PG_BINARY);
|
||||||
int fileMode = (S_IRUSR | S_IWUSR);
|
int fileMode = (S_IRUSR | S_IWUSR);
|
||||||
|
|
||||||
int32 fileDescriptor = BasicOpenFile(filename, fileFlags, fileMode);
|
int32 fileDescriptor = BasicOpenFilePerm(filename, fileFlags, fileMode);
|
||||||
if (fileDescriptor >= 0)
|
if (fileDescriptor >= 0)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
#include "distributed/transmit.h"
|
#include "distributed/transmit.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
#include "distributed/worker_transaction.h"
|
#include "distributed/worker_transaction.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "executor/executor.h"
|
#include "executor/executor.h"
|
||||||
#include "foreign/foreign.h"
|
#include "foreign/foreign.h"
|
||||||
#include "lib/stringinfo.h"
|
#include "lib/stringinfo.h"
|
||||||
|
@ -3257,16 +3258,13 @@ CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist)
|
||||||
if (attnamelist == NIL)
|
if (attnamelist == NIL)
|
||||||
{
|
{
|
||||||
/* Generate default column list */
|
/* Generate default column list */
|
||||||
Form_pg_attribute *attr = tupDesc->attrs;
|
|
||||||
int attr_count = tupDesc->natts;
|
int attr_count = tupDesc->natts;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < attr_count; i++)
|
for (i = 0; i < attr_count; i++)
|
||||||
{
|
{
|
||||||
if (attr[i]->attisdropped)
|
if (TupleDescAttr(tupDesc, i)->attisdropped)
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
attnums = lappend_int(attnums, i + 1);
|
attnums = lappend_int(attnums, i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3285,41 +3283,35 @@ CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist)
|
||||||
attnum = InvalidAttrNumber;
|
attnum = InvalidAttrNumber;
|
||||||
for (i = 0; i < tupDesc->natts; i++)
|
for (i = 0; i < tupDesc->natts; i++)
|
||||||
{
|
{
|
||||||
if (tupDesc->attrs[i]->attisdropped)
|
Form_pg_attribute att = TupleDescAttr(tupDesc, i);
|
||||||
{
|
|
||||||
|
if (att->attisdropped)
|
||||||
continue;
|
continue;
|
||||||
}
|
if (namestrcmp(&(att->attname), name) == 0)
|
||||||
if (namestrcmp(&(tupDesc->attrs[i]->attname), name) == 0)
|
|
||||||
{
|
{
|
||||||
attnum = tupDesc->attrs[i]->attnum;
|
attnum = att->attnum;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (attnum == InvalidAttrNumber)
|
if (attnum == InvalidAttrNumber)
|
||||||
{
|
{
|
||||||
if (rel != NULL)
|
if (rel != NULL)
|
||||||
{
|
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||||
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
errmsg("column \"%s\" of relation \"%s\" does not exist",
|
||||||
name, RelationGetRelationName(rel))));
|
name, RelationGetRelationName(rel))));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||||
errmsg("column \"%s\" does not exist",
|
errmsg("column \"%s\" does not exist",
|
||||||
name)));
|
name)));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* Check for duplicates */
|
/* Check for duplicates */
|
||||||
if (list_member_int(attnums, attnum))
|
if (list_member_int(attnums, attnum))
|
||||||
{
|
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
(errcode(ERRCODE_DUPLICATE_COLUMN),
|
||||||
errmsg("column \"%s\" specified more than once",
|
errmsg("column \"%s\" specified more than once",
|
||||||
name)));
|
name)));
|
||||||
}
|
|
||||||
attnums = lappend_int(attnums, attnum);
|
attnums = lappend_int(attnums, attnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "distributed/multi_server_executor.h"
|
#include "distributed/multi_server_executor.h"
|
||||||
#include "distributed/remote_commands.h"
|
#include "distributed/remote_commands.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "lib/stringinfo.h"
|
#include "lib/stringinfo.h"
|
||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
|
|
||||||
|
@ -108,10 +109,10 @@ master_run_on_worker(PG_FUNCTION_ARGS)
|
||||||
* Check to make sure we have correct tuple descriptor
|
* Check to make sure we have correct tuple descriptor
|
||||||
*/
|
*/
|
||||||
if (tupleDescriptor->natts != 4 ||
|
if (tupleDescriptor->natts != 4 ||
|
||||||
tupleDescriptor->attrs[0]->atttypid != TEXTOID ||
|
TupleDescAttr(tupleDescriptor, 0)->atttypid != TEXTOID ||
|
||||||
tupleDescriptor->attrs[1]->atttypid != INT4OID ||
|
TupleDescAttr(tupleDescriptor, 1)->atttypid != INT4OID ||
|
||||||
tupleDescriptor->attrs[2]->atttypid != BOOLOID ||
|
TupleDescAttr(tupleDescriptor, 2)->atttypid != BOOLOID ||
|
||||||
tupleDescriptor->attrs[3]->atttypid != TEXTOID)
|
TupleDescAttr(tupleDescriptor, 3)->atttypid != TEXTOID)
|
||||||
{
|
{
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_COLUMN_DEFINITION),
|
(errcode(ERRCODE_INVALID_COLUMN_DEFINITION),
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "distributed/pg_dist_node.h"
|
#include "distributed/pg_dist_node.h"
|
||||||
#include "distributed/worker_manager.h"
|
#include "distributed/worker_manager.h"
|
||||||
#include "distributed/worker_transaction.h"
|
#include "distributed/worker_transaction.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "foreign/foreign.h"
|
#include "foreign/foreign.h"
|
||||||
#include "nodes/pg_list.h"
|
#include "nodes/pg_list.h"
|
||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
|
@ -984,7 +985,7 @@ TypeOfColumn(Oid tableId, int16 columnId)
|
||||||
{
|
{
|
||||||
Relation tableRelation = relation_open(tableId, NoLock);
|
Relation tableRelation = relation_open(tableId, NoLock);
|
||||||
TupleDesc tupleDescriptor = RelationGetDescr(tableRelation);
|
TupleDesc tupleDescriptor = RelationGetDescr(tableRelation);
|
||||||
Form_pg_attribute attrForm = tupleDescriptor->attrs[columnId - 1];
|
Form_pg_attribute attrForm = TupleDescAttr(tupleDescriptor, columnId - 1);
|
||||||
relation_close(tableRelation, NoLock);
|
relation_close(tableRelation, NoLock);
|
||||||
return attrForm->atttypid;
|
return attrForm->atttypid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "distributed/metadata_cache.h"
|
#include "distributed/metadata_cache.h"
|
||||||
#include "distributed/multi_physical_planner.h"
|
#include "distributed/multi_physical_planner.h"
|
||||||
#include "distributed/multi_router_planner.h"
|
#include "distributed/multi_router_planner.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "lib/stringinfo.h"
|
#include "lib/stringinfo.h"
|
||||||
#include "nodes/makefuncs.h"
|
#include "nodes/makefuncs.h"
|
||||||
#include "nodes/nodeFuncs.h"
|
#include "nodes/nodeFuncs.h"
|
||||||
|
@ -262,7 +263,8 @@ ConvertRteToSubqueryWithEmptyResult(RangeTblEntry *rte)
|
||||||
|
|
||||||
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
for (columnIndex = 0; columnIndex < columnCount; columnIndex++)
|
||||||
{
|
{
|
||||||
FormData_pg_attribute *attributeForm = tupleDescriptor->attrs[columnIndex];
|
FormData_pg_attribute *attributeForm = TupleDescAttr(tupleDescriptor,
|
||||||
|
columnIndex);
|
||||||
TargetEntry *targetEntry = NULL;
|
TargetEntry *targetEntry = NULL;
|
||||||
StringInfo resname = NULL;
|
StringInfo resname = NULL;
|
||||||
Const *constValue = NULL;
|
Const *constValue = NULL;
|
||||||
|
|
|
@ -92,6 +92,7 @@ static void ExplainOneQuery(Query *query, int cursorOptions,
|
||||||
static void ExplainOneQuery(Query *query, IntoClause *into, ExplainState *es,
|
static void ExplainOneQuery(Query *query, IntoClause *into, ExplainState *es,
|
||||||
const char *queryString, ParamListInfo params);
|
const char *queryString, ParamListInfo params);
|
||||||
#endif
|
#endif
|
||||||
|
#if (PG_VERSION_NUM < 110000)
|
||||||
static void ExplainOpenGroup(const char *objtype, const char *labelname,
|
static void ExplainOpenGroup(const char *objtype, const char *labelname,
|
||||||
bool labeled, ExplainState *es);
|
bool labeled, ExplainState *es);
|
||||||
static void ExplainCloseGroup(const char *objtype, const char *labelname,
|
static void ExplainCloseGroup(const char *objtype, const char *labelname,
|
||||||
|
@ -99,6 +100,7 @@ static void ExplainCloseGroup(const char *objtype, const char *labelname,
|
||||||
static void ExplainXMLTag(const char *tagname, int flags, ExplainState *es);
|
static void ExplainXMLTag(const char *tagname, int flags, ExplainState *es);
|
||||||
static void ExplainJSONLineEnding(ExplainState *es);
|
static void ExplainJSONLineEnding(ExplainState *es);
|
||||||
static void ExplainYAMLLineStarting(ExplainState *es);
|
static void ExplainYAMLLineStarting(ExplainState *es);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -635,6 +637,7 @@ ExplainOneQuery(Query *query, IntoClause *into, ExplainState *es,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (PG_VERSION_NUM < 110000)
|
||||||
/*
|
/*
|
||||||
* Open a group of related objects.
|
* Open a group of related objects.
|
||||||
*
|
*
|
||||||
|
@ -811,3 +814,4 @@ ExplainYAMLLineStarting(ExplainState *es)
|
||||||
appendStringInfoSpaces(es->str, es->indent * 2);
|
appendStringInfoSpaces(es->str, es->indent * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "distributed/multi_partitioning_utils.h"
|
#include "distributed/multi_partitioning_utils.h"
|
||||||
#include "distributed/relay_utility.h"
|
#include "distributed/relay_utility.h"
|
||||||
#include "distributed/master_metadata_utility.h"
|
#include "distributed/master_metadata_utility.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "foreign/foreign.h"
|
#include "foreign/foreign.h"
|
||||||
#include "lib/stringinfo.h"
|
#include "lib/stringinfo.h"
|
||||||
#include "nodes/nodes.h"
|
#include "nodes/nodes.h"
|
||||||
|
@ -333,7 +334,7 @@ pg_get_tableschemadef_string(Oid tableRelationId, bool includeSequenceDefaults)
|
||||||
|
|
||||||
for (attributeIndex = 0; attributeIndex < tupleDescriptor->natts; attributeIndex++)
|
for (attributeIndex = 0; attributeIndex < tupleDescriptor->natts; attributeIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute attributeForm = tupleDescriptor->attrs[attributeIndex];
|
Form_pg_attribute attributeForm = TupleDescAttr(tupleDescriptor, attributeIndex);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We disregard the inherited attributes (i.e., attinhcount > 0) here. The
|
* We disregard the inherited attributes (i.e., attinhcount > 0) here. The
|
||||||
|
@ -545,7 +546,7 @@ pg_get_tablecolumnoptionsdef_string(Oid tableRelationId)
|
||||||
|
|
||||||
for (attributeIndex = 0; attributeIndex < tupleDescriptor->natts; attributeIndex++)
|
for (attributeIndex = 0; attributeIndex < tupleDescriptor->natts; attributeIndex++)
|
||||||
{
|
{
|
||||||
Form_pg_attribute attributeForm = tupleDescriptor->attrs[attributeIndex];
|
Form_pg_attribute attributeForm = TupleDescAttr(tupleDescriptor, attributeIndex);
|
||||||
char *attributeName = NameStr(attributeForm->attname);
|
char *attributeName = NameStr(attributeForm->attname);
|
||||||
char defaultStorageType = get_typstorage(attributeForm->atttypid);
|
char defaultStorageType = get_typstorage(attributeForm->atttypid);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
#if (PG_VERSION_NUM >= 100000)
|
#if (PG_VERSION_NUM >= 100000 && PG_VERSION_NUM < 110000)
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -7905,4 +7905,4 @@ get_range_partbound_string(List *bound_datums)
|
||||||
return buf->data;
|
return buf->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* (PG_VERSION_NUM >= 100000) */
|
#endif /* (PG_VERSION_NUM >= 100000 && PG_VERSION_NUM < 110000) */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -39,6 +39,7 @@
|
||||||
#include "distributed/resource_lock.h"
|
#include "distributed/resource_lock.h"
|
||||||
#include "distributed/task_tracker.h"
|
#include "distributed/task_tracker.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "nodes/makefuncs.h"
|
#include "nodes/makefuncs.h"
|
||||||
#include "storage/lmgr.h"
|
#include "storage/lmgr.h"
|
||||||
#include "tcop/tcopprot.h"
|
#include "tcop/tcopprot.h"
|
||||||
|
@ -263,7 +264,7 @@ ReceiveRegularFile(const char *nodeName, uint32 nodePort,
|
||||||
/* create local file to append remote data to */
|
/* create local file to append remote data to */
|
||||||
snprintf(filename, MAXPGPATH, "%s", filePath->data);
|
snprintf(filename, MAXPGPATH, "%s", filePath->data);
|
||||||
|
|
||||||
fileDescriptor = BasicOpenFile(filename, fileFlags, fileMode);
|
fileDescriptor = BasicOpenFilePerm(filename, fileFlags, fileMode);
|
||||||
if (fileDescriptor < 0)
|
if (fileDescriptor < 0)
|
||||||
{
|
{
|
||||||
ereport(WARNING, (errcode_for_file_access(),
|
ereport(WARNING, (errcode_for_file_access(),
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "distributed/resource_lock.h"
|
#include "distributed/resource_lock.h"
|
||||||
#include "distributed/transmit.h"
|
#include "distributed/transmit.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
#include "distributed/version_compat.h"
|
||||||
#include "executor/spi.h"
|
#include "executor/spi.h"
|
||||||
#include "mb/pg_wchar.h"
|
#include "mb/pg_wchar.h"
|
||||||
#include "storage/lmgr.h"
|
#include "storage/lmgr.h"
|
||||||
|
@ -191,7 +192,7 @@ worker_hash_partition_table(PG_FUNCTION_ARGS)
|
||||||
CheckCitusVersion(ERROR);
|
CheckCitusVersion(ERROR);
|
||||||
|
|
||||||
/* use column's type information to get the hashing function */
|
/* use column's type information to get the hashing function */
|
||||||
hashFunction = GetFunctionInfo(partitionColumnType, HASH_AM_OID, HASHPROC);
|
hashFunction = GetFunctionInfo(partitionColumnType, HASH_AM_OID, HASHSTANDARD_PROC);
|
||||||
|
|
||||||
/* create hash partition context object */
|
/* create hash partition context object */
|
||||||
partitionContext = palloc0(sizeof(HashPartitionContext));
|
partitionContext = palloc0(sizeof(HashPartitionContext));
|
||||||
|
@ -409,7 +410,7 @@ OpenPartitionFiles(StringInfo directoryName, uint32 fileCount)
|
||||||
{
|
{
|
||||||
StringInfo filePath = PartitionFilename(directoryName, fileIndex);
|
StringInfo filePath = PartitionFilename(directoryName, fileIndex);
|
||||||
|
|
||||||
fileDescriptor = PathNameOpenFile(filePath->data, fileFlags, fileMode);
|
fileDescriptor = PathNameOpenFilePerm(filePath->data, fileFlags, fileMode);
|
||||||
if (fileDescriptor < 0)
|
if (fileDescriptor < 0)
|
||||||
{
|
{
|
||||||
ereport(ERROR, (errcode_for_file_access(),
|
ereport(ERROR, (errcode_for_file_access(),
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*-------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* version_compat.h
|
||||||
|
* Compatibility macros for writing code agnostic to PostgreSQL versions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017, Citus Data, Inc.
|
||||||
|
*
|
||||||
|
*-------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VERSION_COMPAT_H
|
||||||
|
#define VERSION_COMPAT_H
|
||||||
|
|
||||||
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#if (PG_VERSION_NUM >= 90600 && PG_VERSION_NUM < 90700)
|
||||||
|
|
||||||
|
/* Backports from PostgreSQL 10 */
|
||||||
|
/* Accessor for the i'th attribute of tupdesc. */
|
||||||
|
#define TupleDescAttr(tupdesc, i) ((tupdesc)->attrs[(i)])
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (PG_VERSION_NUM >= 90600 && PG_VERSION_NUM < 110000)
|
||||||
|
|
||||||
|
#include "access/hash.h"
|
||||||
|
#include "storage/fd.h"
|
||||||
|
|
||||||
|
/* PostgreSQL 11 splits hash procs into "standard" and "extended" */
|
||||||
|
#define HASHSTANDARD_PROC HASHPROC
|
||||||
|
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
BasicOpenFilePerm(FileName fileName, int fileFlags, int fileMode)
|
||||||
|
{
|
||||||
|
return BasicOpenFile(fileName, fileFlags, fileMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline File
|
||||||
|
PathNameOpenFilePerm(FileName fileName, int fileFlags, int fileMode)
|
||||||
|
{
|
||||||
|
return PathNameOpenFile(fileName, fileFlags, fileMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* VERSION_COMPAT_H */
|
|
@ -2,11 +2,12 @@
|
||||||
-- MULTI_EXPLAIN
|
-- MULTI_EXPLAIN
|
||||||
--
|
--
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
SHOW server_version \gset
|
||||||
major_version
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
---------------
|
version_above_nine
|
||||||
10
|
--------------------
|
||||||
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\a\t
|
\a\t
|
||||||
|
|
|
@ -2,11 +2,12 @@
|
||||||
-- MULTI_EXPLAIN
|
-- MULTI_EXPLAIN
|
||||||
--
|
--
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
SHOW server_version \gset
|
||||||
major_version
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
---------------
|
version_above_nine
|
||||||
9.6
|
--------------------
|
||||||
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
\a\t
|
\a\t
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
-- executor here, as we cannot run repartition jobs with real time executor.
|
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||||
SET citus.enable_unique_job_ids TO off;
|
SET citus.enable_unique_job_ids TO off;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
10
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
-- executor here, as we cannot run repartition jobs with real time executor.
|
-- executor here, as we cannot run repartition jobs with real time executor.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||||
SET citus.enable_unique_job_ids TO off;
|
SET citus.enable_unique_job_ids TO off;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
9
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
-- from a sql task to its depended tasks. Note that we set the executor type to task
|
-- from a sql task to its depended tasks. Note that we set the executor type to task
|
||||||
-- tracker executor here, as we cannot run repartition jobs with real time executor.
|
-- tracker executor here, as we cannot run repartition jobs with real time executor.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
10
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
-- from a sql task to its depended tasks. Note that we set the executor type to task
|
-- from a sql task to its depended tasks. Note that we set the executor type to task
|
||||||
-- tracker executor here, as we cannot run repartition jobs with real time executor.
|
-- tracker executor here, as we cannot run repartition jobs with real time executor.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
9
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
-- This test checks that we can handle null min/max values in shard statistics
|
-- This test checks that we can handle null min/max values in shard statistics
|
||||||
-- and that we don't partition or join prune shards that have null values.
|
-- and that we don't partition or join prune shards that have null values.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
10
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
-- This test checks that we can handle null min/max values in shard statistics
|
-- This test checks that we can handle null min/max values in shard statistics
|
||||||
-- and that we don't partition or join prune shards that have null values.
|
-- and that we don't partition or join prune shards that have null values.
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
9
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
-- MULTI_TASK_ASSIGNMENT
|
-- MULTI_TASK_ASSIGNMENT
|
||||||
--
|
--
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
10
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SET citus.explain_distributed_queries TO off;
|
SET citus.explain_distributed_queries TO off;
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
-- MULTI_TASK_ASSIGNMENT
|
-- MULTI_TASK_ASSIGNMENT
|
||||||
--
|
--
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
major_version
|
version_above_nine
|
||||||
---------------
|
--------------------
|
||||||
9
|
f
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SET citus.explain_distributed_queries TO off;
|
SET citus.explain_distributed_queries TO off;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
-- MULTI_CREATE_TABLE_NEW_FEATURES
|
-- MULTI_CREATE_TABLE_NEW_FEATURES
|
||||||
--
|
--
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
-- Verify that the GENERATED ... AS IDENTITY feature in PostgreSQL 10
|
-- Verify that the GENERATED ... AS IDENTITY feature in PostgreSQL 10
|
||||||
-- is forbidden in distributed tables.
|
-- is forbidden in distributed tables.
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 570000;
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SELECT substring(version(), '\d+(?:\.\d+)?') AS major_version;
|
SHOW server_version \gset
|
||||||
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
\a\t
|
\a\t
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 690000;
|
||||||
SET citus.enable_unique_job_ids TO off;
|
SET citus.enable_unique_job_ids TO off;
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SET client_min_messages TO DEBUG4;
|
SET client_min_messages TO DEBUG4;
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 710000;
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
|
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 760000;
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
SET client_min_messages TO DEBUG2;
|
SET client_min_messages TO DEBUG2;
|
||||||
SET citus.explain_all_tasks TO on;
|
SET citus.explain_all_tasks TO on;
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
ALTER SEQUENCE pg_catalog.pg_dist_shardid_seq RESTART 880000;
|
||||||
|
|
||||||
-- print major version to make version-specific tests clear
|
-- print whether we're using version > 9 to make version-specific tests clear
|
||||||
SHOW server_version \gset
|
SHOW server_version \gset
|
||||||
SELECT substring(:'server_version', '\d+') AS major_version;
|
SELECT substring(:'server_version', '\d+')::int > 9 AS version_above_nine;
|
||||||
|
|
||||||
|
|
||||||
SET citus.explain_distributed_queries TO off;
|
SET citus.explain_distributed_queries TO off;
|
||||||
|
|
Loading…
Reference in New Issue