Commit b5bce6c1 authored by Tom Lane's avatar Tom Lane

Final pgindent + perltidy run for 9.6.

parent 05d8dec6
...@@ -264,8 +264,8 @@ brinvalidate(Oid opclassoid) ...@@ -264,8 +264,8 @@ brinvalidate(Oid opclassoid)
continue; /* got it */ continue; /* got it */
ereport(INFO, ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("brin operator class \"%s\" is missing support function %d", errmsg("brin operator class \"%s\" is missing support function %d",
opclassname, i))); opclassname, i)));
result = false; result = false;
} }
......
...@@ -243,8 +243,8 @@ ginvalidate(Oid opclassoid) ...@@ -243,8 +243,8 @@ ginvalidate(Oid opclassoid)
continue; /* don't need both, see check below loop */ continue; /* don't need both, see check below loop */
ereport(INFO, ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gin operator class \"%s\" is missing support function %d", errmsg("gin operator class \"%s\" is missing support function %d",
opclassname, i))); opclassname, i)));
result = false; result = false;
} }
if (!opclassgroup || if (!opclassgroup ||
......
...@@ -261,8 +261,8 @@ gistvalidate(Oid opclassoid) ...@@ -261,8 +261,8 @@ gistvalidate(Oid opclassoid)
continue; /* optional methods */ continue; /* optional methods */
ereport(INFO, ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("gist operator class \"%s\" is missing support function %d", errmsg("gist operator class \"%s\" is missing support function %d",
opclassname, i))); opclassname, i)));
result = false; result = false;
} }
......
...@@ -186,9 +186,9 @@ hashvalidate(Oid opclassoid) ...@@ -186,9 +186,9 @@ hashvalidate(Oid opclassoid)
{ {
ereport(INFO, ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION), (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("hash operator family \"%s\" lacks support function for operator %s", errmsg("hash operator family \"%s\" lacks support function for operator %s",
opfamilyname, opfamilyname,
format_operator(oprform->amopopr)))); format_operator(oprform->amopopr))));
result = false; result = false;
} }
} }
......
...@@ -4571,7 +4571,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple, ...@@ -4571,7 +4571,7 @@ heap_lock_tuple(Relation relation, HeapTuple tuple,
ItemId lp; ItemId lp;
Page page; Page page;
Buffer vmbuffer = InvalidBuffer; Buffer vmbuffer = InvalidBuffer;
BlockNumber block; BlockNumber block;
TransactionId xid, TransactionId xid,
xmax; xmax;
uint16 old_infomask, uint16 old_infomask,
...@@ -5643,7 +5643,7 @@ static HTSU_Result ...@@ -5643,7 +5643,7 @@ static HTSU_Result
heap_lock_updated_tuple_rec(Relation rel, ItemPointer tid, TransactionId xid, heap_lock_updated_tuple_rec(Relation rel, ItemPointer tid, TransactionId xid,
LockTupleMode mode) LockTupleMode mode)
{ {
HTSU_Result result; HTSU_Result result;
ItemPointerData tupid; ItemPointerData tupid;
HeapTupleData mytup; HeapTupleData mytup;
Buffer buf; Buffer buf;
...@@ -6698,6 +6698,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid, ...@@ -6698,6 +6698,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
if (tuple->t_infomask & HEAP_MOVED) if (tuple->t_infomask & HEAP_MOVED)
{ {
xid = HeapTupleHeaderGetXvac(tuple); xid = HeapTupleHeaderGetXvac(tuple);
/* /*
* For Xvac, we ignore the cutoff_xid and just always perform the * For Xvac, we ignore the cutoff_xid and just always perform the
* freeze operation. The oldest release in which such a value can * freeze operation. The oldest release in which such a value can
...@@ -8841,9 +8842,9 @@ heap_xlog_lock(XLogReaderState *record) ...@@ -8841,9 +8842,9 @@ heap_xlog_lock(XLogReaderState *record)
*/ */
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED) if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
{ {
RelFileNode rnode; RelFileNode rnode;
Buffer vmbuffer = InvalidBuffer; Buffer vmbuffer = InvalidBuffer;
BlockNumber block; BlockNumber block;
Relation reln; Relation reln;
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block); XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);
...@@ -8914,9 +8915,9 @@ heap_xlog_lock_updated(XLogReaderState *record) ...@@ -8914,9 +8915,9 @@ heap_xlog_lock_updated(XLogReaderState *record)
*/ */
if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED) if (xlrec->flags & XLH_LOCK_ALL_FROZEN_CLEARED)
{ {
RelFileNode rnode; RelFileNode rnode;
Buffer vmbuffer = InvalidBuffer; Buffer vmbuffer = InvalidBuffer;
BlockNumber block; BlockNumber block;
Relation reln; Relation reln;
XLogRecGetBlockTag(record, 0, &rnode, NULL, &block); XLogRecGetBlockTag(record, 0, &rnode, NULL, &block);
......
...@@ -1667,7 +1667,7 @@ toast_delete_datum(Relation rel, Datum value) ...@@ -1667,7 +1667,7 @@ toast_delete_datum(Relation rel, Datum value)
HeapTuple toasttup; HeapTuple toasttup;
int num_indexes; int num_indexes;
int validIndex; int validIndex;
SnapshotData SnapshotToast; SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr)) if (!VARATT_IS_EXTERNAL_ONDISK(attr))
return; return;
...@@ -1734,7 +1734,7 @@ toastrel_valueid_exists(Relation toastrel, Oid valueid) ...@@ -1734,7 +1734,7 @@ toastrel_valueid_exists(Relation toastrel, Oid valueid)
int num_indexes; int num_indexes;
int validIndex; int validIndex;
Relation *toastidxs; Relation *toastidxs;
SnapshotData SnapshotToast; SnapshotData SnapshotToast;
/* Fetch a valid index relation */ /* Fetch a valid index relation */
validIndex = toast_open_indexes(toastrel, validIndex = toast_open_indexes(toastrel,
...@@ -1819,7 +1819,7 @@ toast_fetch_datum(struct varlena * attr) ...@@ -1819,7 +1819,7 @@ toast_fetch_datum(struct varlena * attr)
int32 chunksize; int32 chunksize;
int num_indexes; int num_indexes;
int validIndex; int validIndex;
SnapshotData SnapshotToast; SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr)) if (!VARATT_IS_EXTERNAL_ONDISK(attr))
elog(ERROR, "toast_fetch_datum shouldn't be called for non-ondisk datums"); elog(ERROR, "toast_fetch_datum shouldn't be called for non-ondisk datums");
...@@ -1998,7 +1998,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length) ...@@ -1998,7 +1998,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
int32 chcpyend; int32 chcpyend;
int num_indexes; int num_indexes;
int validIndex; int validIndex;
SnapshotData SnapshotToast; SnapshotData SnapshotToast;
if (!VARATT_IS_EXTERNAL_ONDISK(attr)) if (!VARATT_IS_EXTERNAL_ONDISK(attr))
elog(ERROR, "toast_fetch_datum_slice shouldn't be called for non-ondisk datums"); elog(ERROR, "toast_fetch_datum_slice shouldn't be called for non-ondisk datums");
...@@ -2094,7 +2094,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length) ...@@ -2094,7 +2094,7 @@ toast_fetch_datum_slice(struct varlena * attr, int32 sliceoffset, int32 length)
init_toast_snapshot(&SnapshotToast); init_toast_snapshot(&SnapshotToast);
nextidx = startchunk; nextidx = startchunk;
toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex], toastscan = systable_beginscan_ordered(toastrel, toastidxs[validIndex],
&SnapshotToast, nscankeys, toastkey); &SnapshotToast, nscankeys, toastkey);
while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL) while ((ttup = systable_getnext_ordered(toastscan, ForwardScanDirection)) != NULL)
{ {
/* /*
......
...@@ -776,7 +776,7 @@ assign_client_encoding(const char *newval, void *extra) ...@@ -776,7 +776,7 @@ assign_client_encoding(const char *newval, void *extra)
*/ */
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_INVALID_TRANSACTION_STATE), (errcode(ERRCODE_INVALID_TRANSACTION_STATE),
errmsg("cannot change client_encoding in a parallel worker"))); errmsg("cannot change client_encoding in a parallel worker")));
} }
/* We do not expect an error if PrepareClientEncoding succeeded */ /* We do not expect an error if PrepareClientEncoding succeeded */
......
...@@ -129,7 +129,7 @@ libpqrcv_get_conninfo(void) ...@@ -129,7 +129,7 @@ libpqrcv_get_conninfo(void)
{ {
PQconninfoOption *conn_opts; PQconninfoOption *conn_opts;
PQconninfoOption *conn_opt; PQconninfoOption *conn_opt;
PQExpBufferData buf; PQExpBufferData buf;
char *retval; char *retval;
Assert(streamConn != NULL); Assert(streamConn != NULL);
...@@ -145,7 +145,7 @@ libpqrcv_get_conninfo(void) ...@@ -145,7 +145,7 @@ libpqrcv_get_conninfo(void)
/* build a clean connection string from pieces */ /* build a clean connection string from pieces */
for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++) for (conn_opt = conn_opts; conn_opt->keyword != NULL; conn_opt++)
{ {
bool obfuscate; bool obfuscate;
/* Skip debug and empty options */ /* Skip debug and empty options */
if (strchr(conn_opt->dispchar, 'D') || if (strchr(conn_opt->dispchar, 'D') ||
......
...@@ -193,10 +193,11 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) ...@@ -193,10 +193,11 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
ResetLatch(MyLatch); ResetLatch(MyLatch);
/* /*
* Acquiring the lock is not needed, the latch ensures proper barriers. * Acquiring the lock is not needed, the latch ensures proper
* If it looks like we're done, we must really be done, because once * barriers. If it looks like we're done, we must really be done,
* walsender changes the state to SYNC_REP_WAIT_COMPLETE, it will never * because once walsender changes the state to SYNC_REP_WAIT_COMPLETE,
* update it again, so we can't be seeing a stale value in that case. * it will never update it again, so we can't be seeing a stale value
* in that case.
*/ */
if (MyProc->syncRepState == SYNC_REP_WAIT_COMPLETE) if (MyProc->syncRepState == SYNC_REP_WAIT_COMPLETE)
break; break;
......
...@@ -433,7 +433,8 @@ getNextFlagFromString(IspellDict *Conf, char **sflagset, char *sflag) ...@@ -433,7 +433,8 @@ getNextFlagFromString(IspellDict *Conf, char **sflagset, char *sflag)
if (Conf->flagMode == FM_LONG && maxstep > 0) if (Conf->flagMode == FM_LONG && maxstep > 0)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_CONFIG_FILE_ERROR), (errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("invalid affix flag \"%s\" with \"long\" flag value", sbuf))); errmsg("invalid affix flag \"%s\" with \"long\" flag value",
sbuf)));
*sflag = '\0'; *sflag = '\0';
} }
...@@ -1263,8 +1264,9 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename) ...@@ -1263,8 +1264,9 @@ NIImportOOAffixes(IspellDict *Conf, const char *filename)
else if (STRNCMP(s, "default") != 0) else if (STRNCMP(s, "default") != 0)
ereport(ERROR, ereport(ERROR,
(errcode(ERRCODE_CONFIG_FILE_ERROR), (errcode(ERRCODE_CONFIG_FILE_ERROR),
errmsg("Ispell dictionary supports only \"default\", " errmsg("Ispell dictionary supports only "
"\"long\", and \"num\" flag value"))); "\"default\", \"long\", "
"and \"num\" flag values")));
} }
} }
......
...@@ -1849,9 +1849,9 @@ jsonb_object_agg_transfn(PG_FUNCTION_ARGS) ...@@ -1849,9 +1849,9 @@ jsonb_object_agg_transfn(PG_FUNCTION_ARGS)
single_scalar = false; single_scalar = false;
/* /*
* values can be anything, including structured and null, so we treat * values can be anything, including structured and null, so we treat them
* them as in json_agg_transfn, except that single scalars are always * as in json_agg_transfn, except that single scalars are always pushed as
* pushed as WJB_VALUE items. * WJB_VALUE items.
*/ */
while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE) while ((type = JsonbIteratorNext(&it, &v, false)) != WJB_DONE)
......
...@@ -430,15 +430,16 @@ pushStop(TSQueryParserState state) ...@@ -430,15 +430,16 @@ pushStop(TSQueryParserState state)
#define STACKDEPTH 32 #define STACKDEPTH 32
typedef struct OperatorElement { typedef struct OperatorElement
int8 op; {
int16 distance; int8 op;
int16 distance;
} OperatorElement; } OperatorElement;
static void static void
pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance) pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
{ {
if (*lenstack == STACKDEPTH) /* internal error */ if (*lenstack == STACKDEPTH) /* internal error */
elog(ERROR, "tsquery stack too small"); elog(ERROR, "tsquery stack too small");
stack[*lenstack].op = op; stack[*lenstack].op = op;
...@@ -449,20 +450,20 @@ pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance) ...@@ -449,20 +450,20 @@ pushOpStack(OperatorElement *stack, int *lenstack, int8 op, int16 distance)
static void static void
cleanOpStack(TSQueryParserState state, cleanOpStack(TSQueryParserState state,
OperatorElement *stack, int *lenstack, int8 op) OperatorElement *stack, int *lenstack, int8 op)
{ {
int opPriority = OP_PRIORITY(op); int opPriority = OP_PRIORITY(op);
while(*lenstack) while (*lenstack)
{ {
/* NOT is right associative unlike to others */ /* NOT is right associative unlike to others */
if ((op != OP_NOT && opPriority > OP_PRIORITY(stack[*lenstack - 1].op)) || if ((op != OP_NOT && opPriority > OP_PRIORITY(stack[*lenstack - 1].op)) ||
(op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op))) (op == OP_NOT && opPriority >= OP_PRIORITY(stack[*lenstack - 1].op)))
break; break;
(*lenstack)--; (*lenstack)--;
pushOperator(state, stack[*lenstack].op, pushOperator(state, stack[*lenstack].op,
stack[*lenstack].distance); stack[*lenstack].distance);
} }
} }
...@@ -480,7 +481,7 @@ makepol(TSQueryParserState state, ...@@ -480,7 +481,7 @@ makepol(TSQueryParserState state,
ts_tokentype type; ts_tokentype type;
int lenval = 0; int lenval = 0;
char *strval = NULL; char *strval = NULL;
OperatorElement opstack[STACKDEPTH]; OperatorElement opstack[STACKDEPTH];
int lenstack = 0; int lenstack = 0;
int16 weight = 0; int16 weight = 0;
bool prefix; bool prefix;
...@@ -503,7 +504,7 @@ makepol(TSQueryParserState state, ...@@ -503,7 +504,7 @@ makepol(TSQueryParserState state,
makepol(state, pushval, opaque); makepol(state, pushval, opaque);
break; break;
case PT_CLOSE: case PT_CLOSE:
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */); cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
return; return;
case PT_ERR: case PT_ERR:
default: default:
...@@ -514,7 +515,7 @@ makepol(TSQueryParserState state, ...@@ -514,7 +515,7 @@ makepol(TSQueryParserState state,
} }
} }
cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */); cleanOpStack(state, opstack, &lenstack, OP_OR /* lowest */ );
} }
static void static void
...@@ -845,8 +846,8 @@ infix(INFIX *in, int parentPriority, bool rightPhraseOp) ...@@ -845,8 +846,8 @@ infix(INFIX *in, int parentPriority, bool rightPhraseOp)
in->curpol++; in->curpol++;
if (priority < parentPriority || if (priority < parentPriority ||
/* phrase operator depends on order */ /* phrase operator depends on order */
(op == OP_PHRASE && rightPhraseOp)) (op == OP_PHRASE && rightPhraseOp))
{ {
needParenthesis = true; needParenthesis = true;
RESIZEBUF(in, 2); RESIZEBUF(in, 2);
...@@ -916,7 +917,7 @@ tsqueryout(PG_FUNCTION_ARGS) ...@@ -916,7 +917,7 @@ tsqueryout(PG_FUNCTION_ARGS)
nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen); nrm.cur = nrm.buf = (char *) palloc(sizeof(char) * nrm.buflen);
*(nrm.cur) = '\0'; *(nrm.cur) = '\0';
nrm.op = GETOPERAND(query); nrm.op = GETOPERAND(query);
infix(&nrm, -1 /* lowest priority */, false); infix(&nrm, -1 /* lowest priority */ , false);
PG_FREE_IF_COPY(query, 0); PG_FREE_IF_COPY(query, 0);
PG_RETURN_CSTRING(nrm.buf); PG_RETURN_CSTRING(nrm.buf);
......
...@@ -406,7 +406,7 @@ normalize_phrase_tree(NODE *node) ...@@ -406,7 +406,7 @@ normalize_phrase_tree(NODE *node)
if (node->valnode->qoperator.oper == OP_NOT) if (node->valnode->qoperator.oper == OP_NOT)
{ {
NODE *orignode = node; NODE *orignode = node;
/* eliminate NOT sequence */ /* eliminate NOT sequence */
while (node->valnode->type == QI_OPR && while (node->valnode->type == QI_OPR &&
...@@ -430,8 +430,8 @@ normalize_phrase_tree(NODE *node) ...@@ -430,8 +430,8 @@ normalize_phrase_tree(NODE *node)
node->right = normalize_phrase_tree(node->right); node->right = normalize_phrase_tree(node->right);
/* /*
* if subtree contains only nodes with higher "priority" then * if subtree contains only nodes with higher "priority" then we are
* we are done. See comment near NODE_PRIORITY() * done. See comment near NODE_PRIORITY()
*/ */
if (NODE_PRIORITY(node) <= NODE_PRIORITY(node->right) && if (NODE_PRIORITY(node) <= NODE_PRIORITY(node->right) &&
NODE_PRIORITY(node) <= NODE_PRIORITY(node->left)) NODE_PRIORITY(node) <= NODE_PRIORITY(node->left))
......
...@@ -299,9 +299,9 @@ struct Tuplesortstate ...@@ -299,9 +299,9 @@ struct Tuplesortstate
* Function to read a stored tuple from tape back into memory. 'len' is * Function to read a stored tuple from tape back into memory. 'len' is
* the already-read length of the stored tuple. Create a palloc'd copy, * the already-read length of the stored tuple. Create a palloc'd copy,
* initialize tuple/datum1/isnull1 in the target SortTuple struct, and * initialize tuple/datum1/isnull1 in the target SortTuple struct, and
* decrease state->availMem by the amount of memory space consumed. * decrease state->availMem by the amount of memory space consumed. (See
* (See batchUsed notes for details on how memory is handled when * batchUsed notes for details on how memory is handled when incremental
* incremental accounting is abandoned.) * accounting is abandoned.)
*/ */
void (*readtup) (Tuplesortstate *state, SortTuple *stup, void (*readtup) (Tuplesortstate *state, SortTuple *stup,
int tapenum, unsigned int len); int tapenum, unsigned int len);
...@@ -309,8 +309,8 @@ struct Tuplesortstate ...@@ -309,8 +309,8 @@ struct Tuplesortstate
/* /*
* Function to move a caller tuple. This is usually implemented as a * Function to move a caller tuple. This is usually implemented as a
* memmove() shim, but function may also perform additional fix-up of * memmove() shim, but function may also perform additional fix-up of
* caller tuple where needed. Batch memory support requires the * caller tuple where needed. Batch memory support requires the movement
* movement of caller tuples from one location in memory to another. * of caller tuples from one location in memory to another.
*/ */
void (*movetup) (void *dest, void *src, unsigned int len); void (*movetup) (void *dest, void *src, unsigned int len);
......
...@@ -6042,15 +6042,16 @@ getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables) ...@@ -6042,15 +6042,16 @@ getOwnedSeqs(Archive *fout, TableInfo tblinfo[], int numTables)
* We need to dump the components that are being dumped for the table * We need to dump the components that are being dumped for the table
* and any components which the sequence is explicitly marked with. * and any components which the sequence is explicitly marked with.
* *
* We can't simply use the set of components which are being dumped for * We can't simply use the set of components which are being dumped
* the table as the table might be in an extension (and only the * for the table as the table might be in an extension (and only the
* non-extension components, eg: ACLs if changed, security labels, and * non-extension components, eg: ACLs if changed, security labels, and
* policies, are being dumped) while the sequence is not (and therefore * policies, are being dumped) while the sequence is not (and
* the definition and other components should also be dumped). * therefore the definition and other components should also be
* dumped).
* *
* If the sequence is part of the extension then it should be properly * If the sequence is part of the extension then it should be properly
* marked by checkExtensionMembership() and this will be a no-op as the * marked by checkExtensionMembership() and this will be a no-op as
* table will be equivalently marked. * the table will be equivalently marked.
*/ */
seqinfo->dobj.dump = seqinfo->dobj.dump | owning_tab->dobj.dump; seqinfo->dobj.dump = seqinfo->dobj.dump | owning_tab->dobj.dump;
......
...@@ -1098,7 +1098,8 @@ dumpTablespaces(PGconn *conn) ...@@ -1098,7 +1098,8 @@ dumpTablespaces(PGconn *conn)
else if (server_version >= 90200) else if (server_version >= 90200)
res = executeQuery(conn, "SELECT oid, spcname, " res = executeQuery(conn, "SELECT oid, spcname, "
"pg_catalog.pg_get_userbyid(spcowner) AS spcowner, " "pg_catalog.pg_get_userbyid(spcowner) AS spcowner, "
"pg_catalog.pg_tablespace_location(oid), spcacl, '' as rspcacl, " "pg_catalog.pg_tablespace_location(oid), "
"spcacl, '' as rspcacl, "
"array_to_string(spcoptions, ', ')," "array_to_string(spcoptions, ', '),"
"pg_catalog.shobj_description(oid, 'pg_tablespace') " "pg_catalog.shobj_description(oid, 'pg_tablespace') "
"FROM pg_catalog.pg_tablespace " "FROM pg_catalog.pg_tablespace "
...@@ -1329,10 +1330,10 @@ dumpCreateDB(PGconn *conn) ...@@ -1329,10 +1330,10 @@ dumpCreateDB(PGconn *conn)
"datistemplate, " "datistemplate, "
"(SELECT pg_catalog.array_agg(acl) FROM (SELECT pg_catalog.unnest(coalesce(datacl,pg_catalog.acldefault('d',datdba))) AS acl " "(SELECT pg_catalog.array_agg(acl) FROM (SELECT pg_catalog.unnest(coalesce(datacl,pg_catalog.acldefault('d',datdba))) AS acl "
"EXCEPT SELECT pg_catalog.unnest(pg_catalog.acldefault('d',datdba))) as foo)" "EXCEPT SELECT pg_catalog.unnest(pg_catalog.acldefault('d',datdba))) as foo)"
"AS datacl," "AS datacl, "
"(SELECT pg_catalog.array_agg(acl) FROM (SELECT pg_catalog.unnest(pg_catalog.acldefault('d',datdba)) AS acl " "(SELECT pg_catalog.array_agg(acl) FROM (SELECT pg_catalog.unnest(pg_catalog.acldefault('d',datdba)) AS acl "
"EXCEPT SELECT pg_catalog.unnest(coalesce(datacl,pg_catalog.acldefault('d',datdba)))) as foo)" "EXCEPT SELECT pg_catalog.unnest(coalesce(datacl,pg_catalog.acldefault('d',datdba)))) as foo)"
"AS rdatacl," "AS rdatacl, "
"datconnlimit, " "datconnlimit, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) " "FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) "
...@@ -1343,7 +1344,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1343,7 +1344,8 @@ dumpCreateDB(PGconn *conn)
"coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), " "coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"datcollate, datctype, datfrozenxid, datminmxid, " "datcollate, datctype, datfrozenxid, datminmxid, "
"datistemplate, datacl, '' as rdatacl, datconnlimit, " "datistemplate, datacl, '' as rdatacl, "
"datconnlimit, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) " "FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1353,7 +1355,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1353,7 +1355,8 @@ dumpCreateDB(PGconn *conn)
"coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), " "coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"datcollate, datctype, datfrozenxid, 0 AS datminmxid, " "datcollate, datctype, datfrozenxid, 0 AS datminmxid, "
"datistemplate, datacl, '' as rdatacl, datconnlimit, " "datistemplate, datacl, '' as rdatacl, "
"datconnlimit, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) " "FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1363,7 +1366,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1363,7 +1366,8 @@ dumpCreateDB(PGconn *conn)
"coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), " "coalesce(rolname, (select rolname from pg_authid where oid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, " "null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, "
"datistemplate, datacl, '' as rdatacl, datconnlimit, " "datistemplate, datacl, '' as rdatacl, "
"datconnlimit, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) " "FROM pg_database d LEFT JOIN pg_authid u ON (datdba = u.oid) "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1373,7 +1377,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1373,7 +1377,8 @@ dumpCreateDB(PGconn *conn)
"coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), " "coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, " "null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, "
"datistemplate, datacl, '' as rdatacl, -1 as datconnlimit, " "datistemplate, datacl, '' as rdatacl, "
"-1 as datconnlimit, "
"(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace " "(SELECT spcname FROM pg_tablespace t WHERE t.oid = d.dattablespace) AS dattablespace "
"FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) " "FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1383,7 +1388,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1383,7 +1388,8 @@ dumpCreateDB(PGconn *conn)
"coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), " "coalesce(usename, (select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, " "null::text AS datcollate, null::text AS datctype, datfrozenxid, 0 AS datminmxid, "
"datistemplate, datacl, '' as rdatacl, -1 as datconnlimit, " "datistemplate, datacl, '' as rdatacl, "
"-1 as datconnlimit, "
"'pg_default' AS dattablespace " "'pg_default' AS dattablespace "
"FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) " "FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid) "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1395,7 +1401,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1395,7 +1401,8 @@ dumpCreateDB(PGconn *conn)
"(select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), " "(select usename from pg_shadow where usesysid=(select datdba from pg_database where datname='template0'))), "
"pg_encoding_to_char(d.encoding), " "pg_encoding_to_char(d.encoding), "
"null::text AS datcollate, null::text AS datctype, 0 AS datfrozenxid, 0 AS datminmxid, " "null::text AS datcollate, null::text AS datctype, 0 AS datfrozenxid, 0 AS datminmxid, "
"datistemplate, '' as datacl, '' as rdatacl, -1 as datconnlimit, " "datistemplate, '' as datacl, '' as rdatacl, "
"-1 as datconnlimit, "
"'pg_default' AS dattablespace " "'pg_default' AS dattablespace "
"FROM pg_database d " "FROM pg_database d "
"WHERE datallowconn ORDER BY 1"); "WHERE datallowconn ORDER BY 1");
...@@ -1522,7 +1529,8 @@ dumpCreateDB(PGconn *conn) ...@@ -1522,7 +1529,8 @@ dumpCreateDB(PGconn *conn)
} }
if (!skip_acls && if (!skip_acls &&
!buildACLCommands(fdbname, NULL, "DATABASE", dbacl, rdbacl, dbowner, !buildACLCommands(fdbname, NULL, "DATABASE",
dbacl, rdbacl, dbowner,
"", server_version, buf)) "", server_version, buf))
{ {
fprintf(stderr, _("%s: could not parse ACL list (%s) for database \"%s\"\n"), fprintf(stderr, _("%s: could not parse ACL list (%s) for database \"%s\"\n"),
......
...@@ -161,8 +161,8 @@ my %pgdump_runs = ( ...@@ -161,8 +161,8 @@ my %pgdump_runs = (
'postgres', ], }, 'postgres', ], },
role => { role => {
dump_cmd => [ dump_cmd => [
'pg_dump', '-f', 'pg_dump', '-f', "$tempdir/role.sql",
"$tempdir/role.sql", '--role=regress_dump_test_role', '--role=regress_dump_test_role',
'--schema=dump_test_second_schema', 'postgres', ], }, '--schema=dump_test_second_schema', 'postgres', ], },
schema_only => { schema_only => {
dump_cmd => dump_cmd =>
...@@ -939,8 +939,8 @@ my %tests = ( ...@@ -939,8 +939,8 @@ my %tests = (
test_schema_plus_blobs => 1, }, }, test_schema_plus_blobs => 1, }, },
'CREATE DATABASE dump_test' => { 'CREATE DATABASE dump_test' => {
create_order => 47, create_order => 47,
create_sql => 'CREATE DATABASE dump_test;', create_sql => 'CREATE DATABASE dump_test;',
regexp => qr/^ regexp => qr/^
\QCREATE DATABASE dump_test WITH TEMPLATE = template0 \E \QCREATE DATABASE dump_test WITH TEMPLATE = template0 \E
.*;/xm, .*;/xm,
like => { pg_dumpall_dbprivs => 1, }, like => { pg_dumpall_dbprivs => 1, },
...@@ -2192,12 +2192,12 @@ my %tests = ( ...@@ -2192,12 +2192,12 @@ my %tests = (
test_schema_plus_blobs => 1, }, }, test_schema_plus_blobs => 1, }, },
'GRANT CREATE ON DATABASE dump_test' => { 'GRANT CREATE ON DATABASE dump_test' => {
create_order => 48, create_order => 48,
create_sql => 'GRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;', create_sql =>
'GRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;',
regexp => qr/^ regexp => qr/^
\QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E \QGRANT CREATE ON DATABASE dump_test TO regress_dump_test_role;\E
/xm, /xm,
like => { like => { pg_dumpall_dbprivs => 1, },
pg_dumpall_dbprivs => 1, },
unlike => { unlike => {
binary_upgrade => 1, binary_upgrade => 1,
clean => 1, clean => 1,
...@@ -2212,14 +2212,15 @@ my %tests = ( ...@@ -2212,14 +2212,15 @@ my %tests = (
only_dump_test_table => 1, only_dump_test_table => 1,
pg_dumpall_globals => 1, pg_dumpall_globals => 1,
schema_only => 1, schema_only => 1,
section_pre_data => 1, , section_pre_data => 1,
test_schema_plus_blobs => 1, }, }, test_schema_plus_blobs => 1, }, },
'GRANT SELECT ON TABLE test_table' => { 'GRANT SELECT ON TABLE test_table' => {
create_order => 5, create_order => 5,
create_sql => 'GRANT SELECT ON TABLE dump_test.test_table create_sql => 'GRANT SELECT ON TABLE dump_test.test_table
TO regress_dump_test_role;', TO regress_dump_test_role;',
regexp => qr/^GRANT SELECT ON TABLE test_table TO regress_dump_test_role;/m, regexp =>
like => { qr/^GRANT SELECT ON TABLE test_table TO regress_dump_test_role;/m,
like => {
binary_upgrade => 1, binary_upgrade => 1,
clean => 1, clean => 1,
clean_if_exists => 1, clean_if_exists => 1,
...@@ -2242,8 +2243,9 @@ my %tests = ( ...@@ -2242,8 +2243,9 @@ my %tests = (
create_sql => 'GRANT SELECT ON create_sql => 'GRANT SELECT ON
TABLE dump_test_second_schema.test_third_table TABLE dump_test_second_schema.test_third_table
TO regress_dump_test_role;', TO regress_dump_test_role;',
regexp => qr/^GRANT SELECT ON TABLE test_third_table TO regress_dump_test_role;/m, regexp =>
like => { qr/^GRANT SELECT ON TABLE test_third_table TO regress_dump_test_role;/m,
like => {
binary_upgrade => 1, binary_upgrade => 1,
clean => 1, clean => 1,
clean_if_exists => 1, clean_if_exists => 1,
...@@ -2480,12 +2482,11 @@ my %tests = ( ...@@ -2480,12 +2482,11 @@ my %tests = (
'REVOKE CONNECT ON DATABASE dump_test FROM public' => { 'REVOKE CONNECT ON DATABASE dump_test FROM public' => {
create_order => 49, create_order => 49,
create_sql => 'REVOKE CONNECT ON DATABASE dump_test FROM public;', create_sql => 'REVOKE CONNECT ON DATABASE dump_test FROM public;',
regexp => qr/^ regexp => qr/^
\QREVOKE CONNECT,TEMPORARY ON DATABASE dump_test FROM PUBLIC;\E\n \QREVOKE CONNECT,TEMPORARY ON DATABASE dump_test FROM PUBLIC;\E\n
\QGRANT TEMPORARY ON DATABASE dump_test TO PUBLIC;\E \QGRANT TEMPORARY ON DATABASE dump_test TO PUBLIC;\E
/xm, /xm,
like => { like => { pg_dumpall_dbprivs => 1, },
pg_dumpall_dbprivs => 1, },
unlike => { unlike => {
binary_upgrade => 1, binary_upgrade => 1,
clean => 1, clean => 1,
......
...@@ -29,8 +29,8 @@ extern Size AsyncShmemSize(void); ...@@ -29,8 +29,8 @@ extern Size AsyncShmemSize(void);
extern void AsyncShmemInit(void); extern void AsyncShmemInit(void);
extern void NotifyMyFrontEnd(const char *channel, extern void NotifyMyFrontEnd(const char *channel,
const char *payload, const char *payload,
int32 srcPid); int32 srcPid);
/* notify-related SQL statements */ /* notify-related SQL statements */
extern void Async_Notify(const char *channel, const char *payload); extern void Async_Notify(const char *channel, const char *payload);
......
...@@ -221,7 +221,7 @@ typedef struct ...@@ -221,7 +221,7 @@ typedef struct
#define OP_NOT 1 #define OP_NOT 1
#define OP_AND 2 #define OP_AND 2
#define OP_OR 3 #define OP_OR 3
#define OP_PHRASE 4 /* highest code, tsquery_cleanup.c */ #define OP_PHRASE 4 /* highest code, tsquery_cleanup.c */
#define OP_COUNT 4 #define OP_COUNT 4
extern const int tsearch_op_priority[OP_COUNT]; extern const int tsearch_op_priority[OP_COUNT];
......
...@@ -472,7 +472,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw) ...@@ -472,7 +472,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
else else
{ {
PLy_exception_set(PyExc_TypeError, PLy_exception_set(PyExc_TypeError,
"'%s' is an invalid keyword argument for this function", "'%s' is an invalid keyword argument for this function",
keyword); keyword);
return NULL; return NULL;
} }
...@@ -528,7 +528,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw) ...@@ -528,7 +528,7 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
(column_name != NULL) ? (column_name != NULL) ?
err_generic_string(PG_DIAG_COLUMN_NAME, column_name) : 0, err_generic_string(PG_DIAG_COLUMN_NAME, column_name) : 0,
(constraint_name != NULL) ? (constraint_name != NULL) ?
err_generic_string(PG_DIAG_CONSTRAINT_NAME, constraint_name) : 0, err_generic_string(PG_DIAG_CONSTRAINT_NAME, constraint_name) : 0,
(datatype_name != NULL) ? (datatype_name != NULL) ?
err_generic_string(PG_DIAG_DATATYPE_NAME, datatype_name) : 0, err_generic_string(PG_DIAG_DATATYPE_NAME, datatype_name) : 0,
(table_name != NULL) ? (table_name != NULL) ?
......
...@@ -223,8 +223,8 @@ my %tests = ( ...@@ -223,8 +223,8 @@ my %tests = (
schema_only => 1, schema_only => 1,
section_pre_data => 1, section_pre_data => 1,
section_post_data => 1, }, }, section_post_data => 1, }, },
'CREATE SEQUENCE regress_pg_dump_table_col1_seq' => { 'CREATE SEQUENCE regress_pg_dump_table_col1_seq' => {
regexp => qr/^ regexp => qr/^
\QCREATE SEQUENCE regress_pg_dump_table_col1_seq\E \QCREATE SEQUENCE regress_pg_dump_table_col1_seq\E
\n\s+\QSTART WITH 1\E \n\s+\QSTART WITH 1\E
\n\s+\QINCREMENT BY 1\E \n\s+\QINCREMENT BY 1\E
...@@ -232,20 +232,20 @@ my %tests = ( ...@@ -232,20 +232,20 @@ my %tests = (
\n\s+\QNO MAXVALUE\E \n\s+\QNO MAXVALUE\E
\n\s+\QCACHE 1;\E \n\s+\QCACHE 1;\E
$/xm, $/xm,
like => { binary_upgrade => 1, }, like => { binary_upgrade => 1, },
unlike => { unlike => {
clean => 1, clean => 1,
clean_if_exists => 1, clean_if_exists => 1,
createdb => 1, createdb => 1,
defaults => 1, defaults => 1,
no_privs => 1, no_privs => 1,
no_owner => 1, no_owner => 1,
pg_dumpall_globals => 1, pg_dumpall_globals => 1,
schema_only => 1, schema_only => 1,
section_pre_data => 1, section_pre_data => 1,
section_post_data => 1, }, }, section_post_data => 1, }, },
'CREATE SEQUENCE regress_pg_dump_seq' => { 'CREATE SEQUENCE regress_pg_dump_seq' => {
regexp => qr/^ regexp => qr/^
\QCREATE SEQUENCE regress_pg_dump_seq\E \QCREATE SEQUENCE regress_pg_dump_seq\E
\n\s+\QSTART WITH 1\E \n\s+\QSTART WITH 1\E
\n\s+\QINCREMENT BY 1\E \n\s+\QINCREMENT BY 1\E
...@@ -253,18 +253,18 @@ my %tests = ( ...@@ -253,18 +253,18 @@ my %tests = (
\n\s+\QNO MAXVALUE\E \n\s+\QNO MAXVALUE\E
\n\s+\QCACHE 1;\E \n\s+\QCACHE 1;\E
$/xm, $/xm,
like => { binary_upgrade => 1, }, like => { binary_upgrade => 1, },
unlike => { unlike => {
clean => 1, clean => 1,
clean_if_exists => 1, clean_if_exists => 1,
createdb => 1, createdb => 1,
defaults => 1, defaults => 1,
no_privs => 1, no_privs => 1,
no_owner => 1, no_owner => 1,
pg_dumpall_globals => 1, pg_dumpall_globals => 1,
schema_only => 1, schema_only => 1,
section_pre_data => 1, section_pre_data => 1,
section_post_data => 1, }, }, section_post_data => 1, }, },
'CREATE TABLE regress_pg_dump_table' => { 'CREATE TABLE regress_pg_dump_table' => {
regexp => qr/^ regexp => qr/^
\QCREATE TABLE regress_pg_dump_table (\E \QCREATE TABLE regress_pg_dump_table (\E
...@@ -353,8 +353,8 @@ my %tests = ( ...@@ -353,8 +353,8 @@ my %tests = (
no_privs => 1, no_privs => 1,
pg_dumpall_globals => 1, pg_dumpall_globals => 1,
section_post_data => 1, }, }, section_post_data => 1, }, },
'GRANT SELECT(col2) ON regress_pg_dump_table TO regress_dump_test_role' => { 'GRANT SELECT(col2) ON regress_pg_dump_table TO regress_dump_test_role' =>
create_order => 4, { create_order => 4,
create_sql => 'GRANT SELECT(col2) ON regress_pg_dump_table create_sql => 'GRANT SELECT(col2) ON regress_pg_dump_table
TO regress_dump_test_role;', TO regress_dump_test_role;',
regexp => qr/^ regexp => qr/^
...@@ -373,9 +373,10 @@ my %tests = ( ...@@ -373,9 +373,10 @@ my %tests = (
no_privs => 1, no_privs => 1,
pg_dumpall_globals => 1, pg_dumpall_globals => 1,
section_post_data => 1, }, }, section_post_data => 1, }, },
'GRANT USAGE ON regress_pg_dump_table_col1_seq TO regress_dump_test_role' => { 'GRANT USAGE ON regress_pg_dump_table_col1_seq TO regress_dump_test_role'
=> {
create_order => 5, create_order => 5,
create_sql => 'GRANT USAGE ON SEQUENCE regress_pg_dump_table_col1_seq create_sql => 'GRANT USAGE ON SEQUENCE regress_pg_dump_table_col1_seq
TO regress_dump_test_role;', TO regress_dump_test_role;',
regexp => qr/^ regexp => qr/^
\QGRANT USAGE ON SEQUENCE regress_pg_dump_table_col1_seq TO regress_dump_test_role;\E \QGRANT USAGE ON SEQUENCE regress_pg_dump_table_col1_seq TO regress_dump_test_role;\E
...@@ -397,8 +398,7 @@ my %tests = ( ...@@ -397,8 +398,7 @@ my %tests = (
regexp => qr/^ regexp => qr/^
\QGRANT USAGE ON SEQUENCE regress_pg_dump_seq TO regress_dump_test_role;\E \QGRANT USAGE ON SEQUENCE regress_pg_dump_seq TO regress_dump_test_role;\E
$/xm, $/xm,
like => { like => { binary_upgrade => 1, },
binary_upgrade => 1, },
unlike => { unlike => {
clean => 1, clean => 1,
clean_if_exists => 1, clean_if_exists => 1,
......
...@@ -475,8 +475,8 @@ sub backup ...@@ -475,8 +475,8 @@ sub backup
my $name = $self->name; my $name = $self->name;
print "# Taking pg_basebackup $backup_name from node \"$name\"\n"; print "# Taking pg_basebackup $backup_name from node \"$name\"\n";
TestLib::system_or_bail('pg_basebackup', '-D', $backup_path, TestLib::system_or_bail('pg_basebackup', '-D', $backup_path, '-p', $port,
'-p', $port, '-x'); '-x');
print "# Backup finished\n"; print "# Backup finished\n";
} }
......
...@@ -66,15 +66,15 @@ $node_master->backup('my_backup'); ...@@ -66,15 +66,15 @@ $node_master->backup('my_backup');
# target TXID. # target TXID.
$node_master->safe_psql('postgres', $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))"); "INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = my $ret = $node_master->safe_psql('postgres',
$node_master->safe_psql('postgres', "SELECT pg_current_xlog_location(), txid_current();"); "SELECT pg_current_xlog_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret; my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp # More data, with recovery target timestamp
$node_master->safe_psql('postgres', $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))"); "INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $ret = $node_master->safe_psql('postgres',
$node_master->safe_psql('postgres', "SELECT pg_current_xlog_location(), now();"); "SELECT pg_current_xlog_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret; my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name # Even more data, this time with a recovery target name
......
...@@ -386,13 +386,11 @@ sub GenerateTimezoneFiles ...@@ -386,13 +386,11 @@ sub GenerateTimezoneFiles
print "Generating timezone files..."; print "Generating timezone files...";
my @args = ("$conf/zic/zic", my @args = ("$conf/zic/zic", '-d', "$target/share/timezone");
'-d',
"$target/share/timezone");
foreach (@tzfiles) foreach (@tzfiles)
{ {
my $tzfile = $_; my $tzfile = $_;
push(@args, "src/timezone/data/$tzfile") push(@args, "src/timezone/data/$tzfile");
} }
system(@args); system(@args);
...@@ -643,9 +641,9 @@ sub CopyIncludeFiles ...@@ -643,9 +641,9 @@ sub CopyIncludeFiles
next unless (-d "src/include/$d"); next unless (-d "src/include/$d");
EnsureDirectories("$target/include/server/$d"); EnsureDirectories("$target/include/server/$d");
my @args = ('xcopy', '/s', '/i', '/q', '/r', '/y', my @args = (
"src\\include\\$d\\*.h", 'xcopy', '/s', '/i', '/q', '/r', '/y', "src\\include\\$d\\*.h",
"$ctarget\\include\\server\\$d\\"); "$ctarget\\include\\server\\$d\\");
system(@args) && croak("Failed to copy include directory $d\n"); system(@args) && croak("Failed to copy include directory $d\n");
} }
closedir($D); closedir($D);
...@@ -699,10 +697,11 @@ sub GenerateNLSFiles ...@@ -699,10 +697,11 @@ sub GenerateNLSFiles
EnsureDirectories($target, "share/locale/$lang", EnsureDirectories($target, "share/locale/$lang",
"share/locale/$lang/LC_MESSAGES"); "share/locale/$lang/LC_MESSAGES");
my @args = ("$nlspath\\bin\\msgfmt", my @args = (
'-o', "$nlspath\\bin\\msgfmt",
"$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", '-o',
$_); "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo",
$_);
system(@args) && croak("Could not run msgfmt on $dir\\$_"); system(@args) && croak("Could not run msgfmt on $dir\\$_");
print "."; print ".";
} }
......
...@@ -469,8 +469,9 @@ sub upgradecheck ...@@ -469,8 +469,9 @@ sub upgradecheck
print "\nSetting up new cluster\n\n"; print "\nSetting up new cluster\n\n";
standard_initdb() or exit 1; standard_initdb() or exit 1;
print "\nRunning pg_upgrade\n\n"; print "\nRunning pg_upgrade\n\n";
@args = ('pg_upgrade', '-d', "$data.old", '-D', $data, '-b', $bindir, @args = (
'-B', $bindir); 'pg_upgrade', '-d', "$data.old", '-D', $data, '-b',
$bindir, '-B', $bindir);
system(@args) == 0 or exit 1; system(@args) == 0 or exit 1;
print "\nStarting new cluster\n\n"; print "\nStarting new cluster\n\n";
@args = ('pg_ctl', '-l', "$logdir/postmaster2.log", '-w', 'start'); @args = ('pg_ctl', '-l', "$logdir/postmaster2.log", '-w', 'start');
......
...@@ -40,6 +40,7 @@ AggClauseCosts ...@@ -40,6 +40,7 @@ AggClauseCosts
AggHashEntry AggHashEntry
AggInfo AggInfo
AggPath AggPath
AggSplit
AggState AggState
AggStatePerAgg AggStatePerAgg
AggStatePerGroup AggStatePerGroup
...@@ -123,6 +124,7 @@ ArrayMetaState ...@@ -123,6 +124,7 @@ ArrayMetaState
ArrayParseState ArrayParseState
ArrayRef ArrayRef
ArrayRefExprState ArrayRefExprState
ArrayRemapInfo
ArrayType ArrayType
AsyncQueueControl AsyncQueueControl
AsyncQueueEntry AsyncQueueEntry
...@@ -612,6 +614,8 @@ FmgrBuiltin ...@@ -612,6 +614,8 @@ FmgrBuiltin
FmgrHookEventType FmgrHookEventType
FmgrInfo FmgrInfo
ForeignDataWrapper ForeignDataWrapper
ForeignKeyCacheInfo
ForeignKeyOptInfo
ForeignPath ForeignPath
ForeignScan ForeignScan
ForeignScanState ForeignScanState
...@@ -917,6 +921,7 @@ ImportQual ...@@ -917,6 +921,7 @@ ImportQual
InclusionOpaque InclusionOpaque
IncrementVarSublevelsUp_context IncrementVarSublevelsUp_context
Index Index
IndexAMProperty
IndexAmRoutine IndexAmRoutine
IndexArrayKeyInfo IndexArrayKeyInfo
IndexAttrBitmapKind IndexAttrBitmapKind
...@@ -1239,6 +1244,7 @@ OpFamilyMember ...@@ -1239,6 +1244,7 @@ OpFamilyMember
OpFamilyOpFuncGroup OpFamilyOpFuncGroup
OpclassInfo OpclassInfo
Operator Operator
OperatorElement
OpfamilyInfo OpfamilyInfo
OprCacheEntry OprCacheEntry
OprCacheKey OprCacheKey
...@@ -1456,7 +1462,6 @@ ParsedText ...@@ -1456,7 +1462,6 @@ ParsedText
ParsedWord ParsedWord
ParserSetupHook ParserSetupHook
ParserState ParserState
PartialAggType
Path Path
PathClauseUsage PathClauseUsage
PathCostComparison PathCostComparison
...@@ -1651,6 +1656,7 @@ RangeBox ...@@ -1651,6 +1656,7 @@ RangeBox
RangeFunction RangeFunction
RangeIOData RangeIOData
RangeQueryClause RangeQueryClause
RangeRemapInfo
RangeSubselect RangeSubselect
RangeTableSample RangeTableSample
RangeTblEntry RangeTblEntry
...@@ -1671,7 +1677,8 @@ RecheckForeignScan_function ...@@ -1671,7 +1677,8 @@ RecheckForeignScan_function
RecordCacheEntry RecordCacheEntry
RecordCompareData RecordCompareData
RecordIOData RecordIOData
RecordTypemodMap RecordRemapInfo
RecordTypmodMap
RecoveryTargetAction RecoveryTargetAction
RecoveryTargetType RecoveryTargetType
RectBox RectBox
...@@ -1708,8 +1715,6 @@ RelfilenodeMapEntry ...@@ -1708,8 +1715,6 @@ RelfilenodeMapEntry
RelfilenodeMapKey RelfilenodeMapKey
Relids Relids
RelocationBufferInfo RelocationBufferInfo
RemapClass
RemapInfo
RenameStmt RenameStmt
ReopenPtr ReopenPtr
ReorderBuffer ReorderBuffer
...@@ -2123,6 +2128,8 @@ TupleHashEntryData ...@@ -2123,6 +2128,8 @@ TupleHashEntryData
TupleHashIterator TupleHashIterator
TupleHashTable TupleHashTable
TupleQueueReader TupleQueueReader
TupleRemapClass
TupleRemapInfo
TupleTableSlot TupleTableSlot
Tuplesortstate Tuplesortstate
Tuplestorestate Tuplestorestate
...@@ -2323,6 +2330,7 @@ amgettuple_function ...@@ -2323,6 +2330,7 @@ amgettuple_function
aminsert_function aminsert_function
ammarkpos_function ammarkpos_function
amoptions_function amoptions_function
amproperty_function
amrescan_function amrescan_function
amrestrpos_function amrestrpos_function
amvacuumcleanup_function amvacuumcleanup_function
...@@ -2353,6 +2361,7 @@ cashKEY ...@@ -2353,6 +2361,7 @@ cashKEY
celt celt
cfp cfp
check_agg_arguments_context check_agg_arguments_context
check_function_callback
check_network_data check_network_data
check_object_relabel_type check_object_relabel_type
check_password_hook_type check_password_hook_type
...@@ -2374,7 +2383,6 @@ core_yy_extra_type ...@@ -2374,7 +2383,6 @@ core_yy_extra_type
core_yyscan_t core_yyscan_t
corrupt_items corrupt_items
cost_qual_eval_context cost_qual_eval_context
count_agg_clauses_context
create_upper_paths_hook_type create_upper_paths_hook_type
createdb_failure_params createdb_failure_params
crosstab_HashEnt crosstab_HashEnt
...@@ -2452,6 +2460,7 @@ generate_series_numeric_fctx ...@@ -2452,6 +2460,7 @@ generate_series_numeric_fctx
generate_series_timestamp_fctx generate_series_timestamp_fctx
generate_series_timestamptz_fctx generate_series_timestamptz_fctx
generate_subscripts_fctx generate_subscripts_fctx
get_agg_clause_costs_context
get_attavgwidth_hook_type get_attavgwidth_hook_type
get_index_stats_hook_type get_index_stats_hook_type
get_relation_info_hook_type get_relation_info_hook_type
...@@ -2580,7 +2589,6 @@ pairingheap_comparator ...@@ -2580,7 +2589,6 @@ pairingheap_comparator
pairingheap_node pairingheap_node
parallel_worker_main_type parallel_worker_main_type
parse_error_callback_arg parse_error_callback_arg
partial_agg_context
pcolor pcolor
pendingPosition pendingPosition
pgParameterStatus pgParameterStatus
...@@ -2839,6 +2847,7 @@ vbits ...@@ -2839,6 +2847,7 @@ vbits
walrcv_connect_type walrcv_connect_type
walrcv_disconnect_type walrcv_disconnect_type
walrcv_endstreaming_type walrcv_endstreaming_type
walrcv_get_conninfo_type
walrcv_identify_system_type walrcv_identify_system_type
walrcv_readtimelinehistoryfile_type walrcv_readtimelinehistoryfile_type
walrcv_receive_type walrcv_receive_type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment