diff --git a/contrib/amcheck/t/001_verify_heapam.pl b/contrib/amcheck/t/001_verify_heapam.pl index f86a932bd0..9bd66c07f4 100644 --- a/contrib/amcheck/t/001_verify_heapam.pl +++ b/contrib/amcheck/t/001_verify_heapam.pl @@ -51,8 +51,7 @@ detects_heap_corruption( # fresh_test_table('test'); $node->safe_psql('postgres', q(VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) test)); -detects_no_corruption( - "verify_heapam('test')", +detects_no_corruption("verify_heapam('test')", "all-frozen not corrupted table"); corrupt_first_page('test'); detects_heap_corruption("verify_heapam('test')", diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify_heapam.c index 36c1b791a2..d8b3fd3d4f 100644 --- a/contrib/amcheck/verify_heapam.c +++ b/contrib/amcheck/verify_heapam.c @@ -839,13 +839,16 @@ check_tuple_visibility(HeapCheckContext *ctx) return false; case XID_COMMITTED: + /* * The tuple is dead, because the xvac transaction moved - * it off and committed. It's checkable, but also prunable. + * it off and committed. It's checkable, but also + * prunable. */ return true; case XID_ABORTED: + /* * The original xmin must have committed, because the xvac * transaction tried to move it later. Since xvac is @@ -905,6 +908,7 @@ check_tuple_visibility(HeapCheckContext *ctx) return false; case XID_COMMITTED: + /* * The original xmin must have committed, because the xvac * transaction moved it later. Whether it's still alive @@ -913,9 +917,11 @@ check_tuple_visibility(HeapCheckContext *ctx) break; case XID_ABORTED: + /* * The tuple is dead, because the xvac transaction moved - * it off and committed. It's checkable, but also prunable. + * it off and committed. It's checkable, but also + * prunable. */ return true; } @@ -924,12 +930,12 @@ check_tuple_visibility(HeapCheckContext *ctx) { /* * Inserting transaction is not in progress, and not committed, so - * it might have changed the TupleDesc in ways we don't know about. - * Thus, don't try to check the tuple structure. + * it might have changed the TupleDesc in ways we don't know + * about. Thus, don't try to check the tuple structure. * * If xmin_status happens to be XID_IS_CURRENT_XID, then in theory - * any such DDL changes ought to be visible to us, so perhaps - * we could check anyway in that case. But, for now, let's be + * any such DDL changes ought to be visible to us, so perhaps we + * could check anyway in that case. But, for now, let's be * conservative and treat this like any other uncommitted insert. */ return false; @@ -945,18 +951,19 @@ check_tuple_visibility(HeapCheckContext *ctx) { /* * xmax is a multixact, so sanity-check the MXID. Note that we do this - * prior to checking for HEAP_XMAX_INVALID or HEAP_XMAX_IS_LOCKED_ONLY. - * This might therefore complain about things that wouldn't actually - * be a problem during a normal scan, but eventually we're going to - * have to freeze, and that process will ignore hint bits. + * prior to checking for HEAP_XMAX_INVALID or + * HEAP_XMAX_IS_LOCKED_ONLY. This might therefore complain about + * things that wouldn't actually be a problem during a normal scan, + * but eventually we're going to have to freeze, and that process will + * ignore hint bits. * * Even if the MXID is out of range, we still know that the original * insert committed, so we can check the tuple itself. However, we * can't rule out the possibility that this tuple is dead, so don't * clear ctx->tuple_could_be_pruned. Possibly we should go ahead and * clear that flag anyway if HEAP_XMAX_INVALID is set or if - * HEAP_XMAX_IS_LOCKED_ONLY is true, but for now we err on the side - * of avoiding possibly-bogus complaints about missing TOAST entries. + * HEAP_XMAX_IS_LOCKED_ONLY is true, but for now we err on the side of + * avoiding possibly-bogus complaints about missing TOAST entries. */ xmax = HeapTupleHeaderGetRawXmax(tuphdr); switch (check_mxid_valid_in_rel(xmax, ctx)) @@ -1066,9 +1073,10 @@ check_tuple_visibility(HeapCheckContext *ctx) * away depends on how old the deleting transaction is. */ ctx->tuple_could_be_pruned = TransactionIdPrecedes(xmax, - ctx->safe_xmin); + ctx->safe_xmin); break; case XID_ABORTED: + /* * The delete aborted or crashed. The tuple is still live. */ @@ -1127,15 +1135,17 @@ check_tuple_visibility(HeapCheckContext *ctx) break; case XID_COMMITTED: + /* * The delete committed. Whether the toast can be vacuumed away * depends on how old the deleting transaction is. */ ctx->tuple_could_be_pruned = TransactionIdPrecedes(xmax, - ctx->safe_xmin); + ctx->safe_xmin); break; case XID_ABORTED: + /* * The delete aborted or crashed. The tuple is still live. */ @@ -1248,6 +1258,7 @@ check_toast_tuple(HeapTuple toasttup, HeapCheckContext *ctx, ta->toast_pointer.va_valueid, chunk_seq, chunksize, expected_size)); } + /* * Check the current attribute as tracked in ctx, recording any corruption * found in ctx->tupstore. diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index 2c1d5f81a8..fdfc320e84 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -536,7 +536,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool heapkeyspace, ereport(DEBUG1, (errcode(ERRCODE_NO_DATA), errmsg_internal("harmless fast root mismatch in index \"%s\"", - RelationGetRelationName(rel)), + RelationGetRelationName(rel)), errdetail_internal("Fast root block %u (level %u) differs from true root block %u (level %u).", metad->btm_fastroot, metad->btm_fastlevel, metad->btm_root, metad->btm_level))); @@ -722,7 +722,7 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level) ereport(DEBUG1, (errcode(ERRCODE_NO_DATA), errmsg_internal("block %u of index \"%s\" concurrently deleted", - current, RelationGetRelationName(state->rel)))); + current, RelationGetRelationName(state->rel)))); goto nextpage; } else if (nextleveldown.leftmost == InvalidBlockNumber) @@ -918,7 +918,7 @@ bt_recheck_sibling_links(BtreeCheckState *state, Buffer newtargetbuf; Page page; BTPageOpaque opaque; - BlockNumber newtargetblock; + BlockNumber newtargetblock; /* Couple locks in the usual order for nbtree: Left to right */ lbuf = ReadBufferExtended(state->rel, MAIN_FORKNUM, leftcurrent, @@ -980,7 +980,7 @@ bt_recheck_sibling_links(BtreeCheckState *state, ereport(DEBUG1, (errcode(ERRCODE_INTERNAL_ERROR), errmsg_internal("harmless concurrent page split detected in index \"%s\"", - RelationGetRelationName(state->rel)), + RelationGetRelationName(state->rel)), errdetail_internal("Block=%u new right sibling=%u original right sibling=%u.", leftcurrent, newtargetblock, state->targetblock))); @@ -1599,7 +1599,7 @@ bt_right_page_check_scankey(BtreeCheckState *state) ereport(DEBUG2, (errcode(ERRCODE_NO_DATA), errmsg_internal("level %u sibling page in block %u of index \"%s\" was found deleted or half dead", - opaque->btpo_level, targetnext, RelationGetRelationName(state->rel)), + opaque->btpo_level, targetnext, RelationGetRelationName(state->rel)), errdetail_internal("Deleted page found when building scankey from right sibling."))); targetnext = opaque->btpo_next; @@ -1729,8 +1729,8 @@ bt_right_page_check_scankey(BtreeCheckState *state) ereport(DEBUG2, (errcode(ERRCODE_NO_DATA), errmsg_internal("%s block %u of index \"%s\" has no first data item", - P_ISLEAF(opaque) ? "leaf" : "internal", targetnext, - RelationGetRelationName(state->rel)))); + P_ISLEAF(opaque) ? "leaf" : "internal", targetnext, + RelationGetRelationName(state->rel)))); return NULL; } @@ -2278,7 +2278,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit, ereport(DEBUG1, (errcode(ERRCODE_NO_DATA), errmsg_internal("harmless interrupted page split detected in index \"%s\"", - RelationGetRelationName(state->rel)), + RelationGetRelationName(state->rel)), errdetail_internal("Block=%u level=%u left sibling=%u page lsn=%X/%X.", blkno, opaque->btpo_level, opaque->btpo_prev, diff --git a/contrib/old_snapshot/time_mapping.c b/contrib/old_snapshot/time_mapping.c index 3df07177ed..02acf77b1a 100644 --- a/contrib/old_snapshot/time_mapping.c +++ b/contrib/old_snapshot/time_mapping.c @@ -25,11 +25,11 @@ */ typedef struct { - int current_index; - int head_offset; - TimestampTz head_timestamp; - int count_used; - TransactionId xid_by_minute[FLEXIBLE_ARRAY_MEMBER]; + int current_index; + int head_offset; + TimestampTz head_timestamp; + int count_used; + TransactionId xid_by_minute[FLEXIBLE_ARRAY_MEMBER]; } OldSnapshotTimeMapping; #define NUM_TIME_MAPPING_COLUMNS 3 @@ -53,7 +53,7 @@ pg_old_snapshot_time_mapping(PG_FUNCTION_ARGS) if (SRF_IS_FIRSTCALL()) { - MemoryContext oldcontext; + MemoryContext oldcontext; funcctx = SRF_FIRSTCALL_INIT(); oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); @@ -127,24 +127,25 @@ MakeOldSnapshotTimeMappingTupleDesc(void) static HeapTuple MakeOldSnapshotTimeMappingTuple(TupleDesc tupdesc, OldSnapshotTimeMapping *mapping) { - Datum values[NUM_TIME_MAPPING_COLUMNS]; - bool nulls[NUM_TIME_MAPPING_COLUMNS]; - int array_position; - TimestampTz timestamp; + Datum values[NUM_TIME_MAPPING_COLUMNS]; + bool nulls[NUM_TIME_MAPPING_COLUMNS]; + int array_position; + TimestampTz timestamp; /* * Figure out the array position corresponding to the current index. * * Index 0 means the oldest entry in the mapping, which is stored at - * mapping->head_offset. Index 1 means the next-oldest entry, which is a the - * following index, and so on. We wrap around when we reach the end of the array. + * mapping->head_offset. Index 1 means the next-oldest entry, which is a + * the following index, and so on. We wrap around when we reach the end of + * the array. */ array_position = (mapping->head_offset + mapping->current_index) % OLD_SNAPSHOT_TIME_MAP_ENTRIES; /* - * No explicit timestamp is stored for any entry other than the oldest one, - * but each entry corresponds to 1-minute period, so we can just add. + * No explicit timestamp is stored for any entry other than the oldest + * one, but each entry corresponds to 1-minute period, so we can just add. */ timestamp = TimestampTzPlusMilliseconds(mapping->head_timestamp, mapping->current_index * 60000); diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 77ca5abcdc..a85f962801 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -1074,9 +1074,10 @@ pgss_ProcessUtility(PlannedStmt *pstmt, const char *queryString, * Force utility statements to get queryId zero. We do this even in cases * where the statement contains an optimizable statement for which a * queryId could be derived (such as EXPLAIN or DECLARE CURSOR). For such - * cases, runtime control will first go through ProcessUtility and then the - * executor, and we don't want the executor hooks to do anything, since we - * are already measuring the statement's costs at the utility level. + * cases, runtime control will first go through ProcessUtility and then + * the executor, and we don't want the executor hooks to do anything, + * since we are already measuring the statement's costs at the utility + * level. * * Note that this is only done if pg_stat_statements is enabled and * configured to track utility statements, in the unlikely possibility diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 7a798530e3..31919fda8c 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -1779,7 +1779,8 @@ rebuildInsertSql(StringInfo buf, char *orig_query, int values_end_len, int num_cols, int num_rows) { - int i, j; + int i, + j; int pindex; bool first; @@ -1790,8 +1791,8 @@ rebuildInsertSql(StringInfo buf, char *orig_query, appendBinaryStringInfo(buf, orig_query, values_end_len); /* - * Add records to VALUES clause (we already have parameters for the - * first row, so start at the right offset). + * Add records to VALUES clause (we already have parameters for the first + * row, so start at the right offset). */ pindex = num_cols + 1; for (i = 0; i < num_rows; i++) diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index ee93ee07cc..cb757d9404 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -146,7 +146,7 @@ typedef struct PgFdwScanState /* for remote query execution */ PGconn *conn; /* connection for the scan */ - PgFdwConnState *conn_state; /* extra per-connection state */ + PgFdwConnState *conn_state; /* extra per-connection state */ unsigned int cursor_number; /* quasi-unique ID for my cursor */ bool cursor_exists; /* have we created the cursor? */ int numParams; /* number of parameters passed to query */ @@ -164,7 +164,7 @@ typedef struct PgFdwScanState bool eof_reached; /* true if last fetch reached EOF */ /* for asynchronous execution */ - bool async_capable; /* engage asynchronous-capable logic? */ + bool async_capable; /* engage asynchronous-capable logic? */ /* working memory contexts */ MemoryContext batch_cxt; /* context holding current batch of tuples */ @@ -183,7 +183,7 @@ typedef struct PgFdwModifyState /* for remote query execution */ PGconn *conn; /* connection for the scan */ - PgFdwConnState *conn_state; /* extra per-connection state */ + PgFdwConnState *conn_state; /* extra per-connection state */ char *p_name; /* name of prepared statement, if created */ /* extracted fdw_private data */ @@ -227,7 +227,7 @@ typedef struct PgFdwDirectModifyState /* for remote query execution */ PGconn *conn; /* connection for the update */ - PgFdwConnState *conn_state; /* extra per-connection state */ + PgFdwConnState *conn_state; /* extra per-connection state */ int numParams; /* number of parameters passed to query */ FmgrInfo *param_flinfo; /* output conversion functions for them */ List *param_exprs; /* executable expressions for param values */ @@ -364,10 +364,10 @@ static TupleTableSlot *postgresExecForeignInsert(EState *estate, TupleTableSlot *slot, TupleTableSlot *planSlot); static TupleTableSlot **postgresExecForeignBatchInsert(EState *estate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int *numSlots); + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int *numSlots); static int postgresGetForeignModifyBatchSize(ResultRelInfo *resultRelInfo); static TupleTableSlot *postgresExecForeignUpdate(EState *estate, ResultRelInfo *resultRelInfo, @@ -467,11 +467,11 @@ static PgFdwModifyState *create_foreign_modify(EState *estate, bool has_returning, List *retrieved_attrs); static TupleTableSlot **execute_foreign_modify(EState *estate, - ResultRelInfo *resultRelInfo, - CmdType operation, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int *numSlots); + ResultRelInfo *resultRelInfo, + CmdType operation, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int *numSlots); static void prepare_foreign_modify(PgFdwModifyState *fmstate); static const char **convert_prep_stmt_params(PgFdwModifyState *fmstate, ItemPointer tupleid, @@ -545,7 +545,7 @@ static void apply_table_options(PgFdwRelationInfo *fpinfo); static void merge_fdw_options(PgFdwRelationInfo *fpinfo, const PgFdwRelationInfo *fpinfo_o, const PgFdwRelationInfo *fpinfo_i); -static int get_batch_size_option(Relation rel); +static int get_batch_size_option(Relation rel); /* @@ -1870,7 +1870,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate, target_attrs = (List *) list_nth(fdw_private, FdwModifyPrivateTargetAttnums); values_end_len = intVal(list_nth(fdw_private, - FdwModifyPrivateLen)); + FdwModifyPrivateLen)); has_returning = intVal(list_nth(fdw_private, FdwModifyPrivateHasReturning)); retrieved_attrs = (List *) list_nth(fdw_private, @@ -1907,7 +1907,7 @@ postgresExecForeignInsert(EState *estate, { PgFdwModifyState *fmstate = (PgFdwModifyState *) resultRelInfo->ri_FdwState; TupleTableSlot **rslot; - int numSlots = 1; + int numSlots = 1; /* * If the fmstate has aux_fmstate set, use the aux_fmstate (see @@ -1930,10 +1930,10 @@ postgresExecForeignInsert(EState *estate, */ static TupleTableSlot ** postgresExecForeignBatchInsert(EState *estate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int *numSlots) + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int *numSlots) { PgFdwModifyState *fmstate = (PgFdwModifyState *) resultRelInfo->ri_FdwState; TupleTableSlot **rslot; @@ -1964,17 +1964,17 @@ postgresExecForeignBatchInsert(EState *estate, static int postgresGetForeignModifyBatchSize(ResultRelInfo *resultRelInfo) { - int batch_size; + int batch_size; PgFdwModifyState *fmstate = resultRelInfo->ri_FdwState ? - (PgFdwModifyState *) resultRelInfo->ri_FdwState : - NULL; + (PgFdwModifyState *) resultRelInfo->ri_FdwState : + NULL; /* should be called only once */ Assert(resultRelInfo->ri_BatchSize == 0); /* - * Should never get called when the insert is being performed as part of - * a row movement operation. + * Should never get called when the insert is being performed as part of a + * row movement operation. */ Assert(fmstate == NULL || fmstate->aux_fmstate == NULL); @@ -2009,10 +2009,10 @@ postgresExecForeignUpdate(EState *estate, TupleTableSlot *planSlot) { TupleTableSlot **rslot; - int numSlots = 1; + int numSlots = 1; rslot = execute_foreign_modify(estate, resultRelInfo, CMD_UPDATE, - &slot, &planSlot, &numSlots); + &slot, &planSlot, &numSlots); return rslot ? rslot[0] : NULL; } @@ -2028,10 +2028,10 @@ postgresExecForeignDelete(EState *estate, TupleTableSlot *planSlot) { TupleTableSlot **rslot; - int numSlots = 1; + int numSlots = 1; rslot = execute_foreign_modify(estate, resultRelInfo, CMD_DELETE, - &slot, &planSlot, &numSlots); + &slot, &planSlot, &numSlots); return rslot ? rslot[0] : NULL; } @@ -2117,13 +2117,13 @@ postgresBeginForeignInsert(ModifyTableState *mtstate, /* * If the foreign table is a partition that doesn't have a corresponding - * RTE entry, we need to create a new RTE - * describing the foreign table for use by deparseInsertSql and - * create_foreign_modify() below, after first copying the parent's RTE and - * modifying some fields to describe the foreign partition to work on. - * However, if this is invoked by UPDATE, the existing RTE may already - * correspond to this partition if it is one of the UPDATE subplan target - * rels; in that case, we can just use the existing RTE as-is. + * RTE entry, we need to create a new RTE describing the foreign table for + * use by deparseInsertSql and create_foreign_modify() below, after first + * copying the parent's RTE and modifying some fields to describe the + * foreign partition to work on. However, if this is invoked by UPDATE, + * the existing RTE may already correspond to this partition if it is one + * of the UPDATE subplan target rels; in that case, we can just use the + * existing RTE as-is. */ if (resultRelInfo->ri_RangeTableIndex == 0) { @@ -2847,8 +2847,8 @@ postgresExplainForeignModify(ModifyTableState *mtstate, ExplainPropertyText("Remote SQL", sql, es); /* - * For INSERT we should always have batch size >= 1, but UPDATE - * and DELETE don't support batching so don't show the property. + * For INSERT we should always have batch size >= 1, but UPDATE and + * DELETE don't support batching so don't show the property. */ if (rinfo->ri_BatchSize > 0) ExplainPropertyInteger("Batch Size", NULL, rinfo->ri_BatchSize, es); @@ -7255,18 +7255,18 @@ find_em_expr_for_input_target(PlannerInfo *root, static int get_batch_size_option(Relation rel) { - Oid foreigntableid = RelationGetRelid(rel); + Oid foreigntableid = RelationGetRelid(rel); ForeignTable *table; ForeignServer *server; List *options; ListCell *lc; /* we use 1 by default, which means "no batching" */ - int batch_size = 1; + int batch_size = 1; /* - * Load options for table and server. We append server options after - * table options, because table options take precedence. + * Load options for table and server. We append server options after table + * options, because table options take precedence. */ table = GetForeignTable(foreigntableid); server = GetForeignServer(table->serverid); diff --git a/src/backend/access/brin/brin.c b/src/backend/access/brin/brin.c index c23ea44866..ccc9fa0959 100644 --- a/src/backend/access/brin/brin.c +++ b/src/backend/access/brin/brin.c @@ -645,11 +645,11 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm) * range values; if so, have the pages in the range added * to the output bitmap. * - * The opclass may or may not support processing of multiple - * scan keys. We can determine that based on the number of - * arguments - functions with extra parameter (number of scan - * keys) do support this, otherwise we have to simply pass the - * scan keys one by one. + * The opclass may or may not support processing of + * multiple scan keys. We can determine that based on the + * number of arguments - functions with extra parameter + * (number of scan keys) do support this, otherwise we + * have to simply pass the scan keys one by one. */ if (consistentFn[attno - 1].fn_nargs >= 4) { @@ -667,10 +667,10 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm) /* * Check keys one by one * - * When there are multiple scan keys, failure to meet the - * criteria for a single one of them is enough to discard - * the range as a whole, so break out of the loop as soon - * as a false return value is obtained. + * When there are multiple scan keys, failure to meet + * the criteria for a single one of them is enough to + * discard the range as a whole, so break out of the + * loop as soon as a false return value is obtained. */ int keyno; diff --git a/src/backend/access/brin/brin_bloom.c b/src/backend/access/brin/brin_bloom.c index e83c2b82e1..99b2543f76 100644 --- a/src/backend/access/brin/brin_bloom.c +++ b/src/backend/access/brin/brin_bloom.c @@ -258,7 +258,7 @@ typedef struct BloomFilter /* data of the bloom filter */ char data[FLEXIBLE_ARRAY_MEMBER]; -} BloomFilter; +} BloomFilter; /* @@ -341,7 +341,7 @@ bloom_init(int ndistinct, double false_positive_rate) * Add value to the bloom filter. */ static BloomFilter * -bloom_add_value(BloomFilter * filter, uint32 value, bool *updated) +bloom_add_value(BloomFilter *filter, uint32 value, bool *updated) { int i; uint64 h1, @@ -378,7 +378,7 @@ bloom_add_value(BloomFilter * filter, uint32 value, bool *updated) * Check if the bloom filter contains a particular value. */ static bool -bloom_contains_value(BloomFilter * filter, uint32 value) +bloom_contains_value(BloomFilter *filter, uint32 value) { int i; uint64 h1, @@ -414,7 +414,7 @@ typedef struct BloomOpaque */ FmgrInfo extra_procinfos[BLOOM_MAX_PROCNUMS]; bool extra_proc_missing[BLOOM_MAX_PROCNUMS]; -} BloomOpaque; +} BloomOpaque; static FmgrInfo *bloom_get_procinfo(BrinDesc *bdesc, uint16 attno, uint16 procnum); diff --git a/src/backend/access/brin/brin_minmax_multi.c b/src/backend/access/brin/brin_minmax_multi.c index 5e4b234cc6..bd14184d76 100644 --- a/src/backend/access/brin/brin_minmax_multi.c +++ b/src/backend/access/brin/brin_minmax_multi.c @@ -114,7 +114,7 @@ typedef struct MinmaxMultiOpaque bool extra_proc_missing[MINMAX_MAX_PROCNUMS]; Oid cached_subtype; FmgrInfo strategy_procinfos[BTMaxStrategyNumber]; -} MinmaxMultiOpaque; +} MinmaxMultiOpaque; /* * Storage type for BRIN's minmax reloptions @@ -261,7 +261,7 @@ typedef struct compare_context { FmgrInfo *cmpFn; Oid colloid; -} compare_context; +} compare_context; static int compare_values(const void *a, const void *b, void *arg); @@ -670,11 +670,11 @@ range_serialize(Ranges *range) /* * For values passed by value, we need to copy just the * significant bytes - we can't use memcpy directly, as that - * assumes little endian behavior. store_att_byval does - * almost what we need, but it requires properly aligned - * buffer - the output buffer does not guarantee that. So we - * simply use a local Datum variable (which guarantees proper - * alignment), and then copy the value from it. + * assumes little endian behavior. store_att_byval does almost + * what we need, but it requires properly aligned buffer - the + * output buffer does not guarantee that. So we simply use a local + * Datum variable (which guarantees proper alignment), and then + * copy the value from it. */ store_att_byval(&tmp, range->values[i], typlen); @@ -771,7 +771,7 @@ range_deserialize(int maxvalues, SerializedRanges *serialized) dataptr = NULL; for (i = 0; (i < nvalues) && (!typbyval); i++) { - if (typlen > 0) /* fixed-length by-ref types */ + if (typlen > 0) /* fixed-length by-ref types */ datalen += MAXALIGN(typlen); else if (typlen == -1) /* varlena */ { @@ -824,7 +824,8 @@ range_deserialize(int maxvalues, SerializedRanges *serialized) } else if (typlen == -2) /* cstring */ { - Size slen = strlen(ptr) + 1; + Size slen = strlen(ptr) + 1; + range->values[i] = PointerGetDatum(dataptr); memcpy(dataptr, ptr, slen); @@ -2156,8 +2157,8 @@ brin_minmax_multi_distance_interval(PG_FUNCTION_ARGS) /* * Delta is (fractional) number of days between the intervals. Assume - * months have 30 days for consistency with interval_cmp_internal. - * We don't need to be exact, in the worst case we'll build a bit less + * months have 30 days for consistency with interval_cmp_internal. We + * don't need to be exact, in the worst case we'll build a bit less * efficient ranges. But we should not contradict interval_cmp. */ dayfraction = result->time % USECS_PER_DAY; @@ -2315,13 +2316,12 @@ brin_minmax_multi_distance_inet(PG_FUNCTION_ARGS) /* * The length is calculated from the mask length, because we sort the - * addresses by first address in the range, so A.B.C.D/24 < A.B.C.1 - * (the first range starts at A.B.C.0, which is before A.B.C.1). We - * don't want to produce negative delta in this case, so we just cut - * the extra bytes. + * addresses by first address in the range, so A.B.C.D/24 < A.B.C.1 (the + * first range starts at A.B.C.0, which is before A.B.C.1). We don't want + * to produce negative delta in this case, so we just cut the extra bytes. * - * XXX Maybe this should be a bit more careful and cut the bits, not - * just whole bytes. + * XXX Maybe this should be a bit more careful and cut the bits, not just + * whole bytes. */ lena = ip_bits(ipa); lenb = ip_bits(ipb); @@ -2331,8 +2331,8 @@ brin_minmax_multi_distance_inet(PG_FUNCTION_ARGS) /* apply the network mask to both addresses */ for (i = 0; i < len; i++) { - unsigned char mask; - int nbits; + unsigned char mask; + int nbits; nbits = lena - (i * 8); if (nbits < 8) diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c index bab2a88ee3..c574c8a06e 100644 --- a/src/backend/access/brin/brin_revmap.c +++ b/src/backend/access/brin/brin_revmap.c @@ -371,6 +371,7 @@ brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk) regBuf = ReadBuffer(idxrel, ItemPointerGetBlockNumber(iptr)); LockBuffer(regBuf, BUFFER_LOCK_EXCLUSIVE); regPg = BufferGetPage(regBuf); + /* * We're only removing data, not reading it, so there's no need to * TestForOldSnapshot here. diff --git a/src/backend/access/brin/brin_tuple.c b/src/backend/access/brin/brin_tuple.c index 8c94e4aa8c..ee05372f79 100644 --- a/src/backend/access/brin/brin_tuple.c +++ b/src/backend/access/brin/brin_tuple.c @@ -177,15 +177,15 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, datumno < brdesc->bd_info[keyno]->oi_nstored; datumno++) { - Datum value = tuple->bt_columns[keyno].bv_values[datumno]; + Datum value = tuple->bt_columns[keyno].bv_values[datumno]; #ifdef TOAST_INDEX_HACK /* We must look at the stored type, not at the index descriptor. */ - TypeCacheEntry *atttype = brdesc->bd_info[keyno]->oi_typcache[datumno]; + TypeCacheEntry *atttype = brdesc->bd_info[keyno]->oi_typcache[datumno]; /* Do we need to free the value at the end? */ - bool free_value = false; + bool free_value = false; /* For non-varlena types we don't need to do anything special */ if (atttype->typlen != -1) @@ -201,9 +201,9 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, * If value is stored EXTERNAL, must fetch it so we are not * depending on outside storage. * - * XXX Is this actually true? Could it be that the summary is - * NULL even for range with non-NULL data? E.g. degenerate bloom - * filter may be thrown away, etc. + * XXX Is this actually true? Could it be that the summary is NULL + * even for range with non-NULL data? E.g. degenerate bloom filter + * may be thrown away, etc. */ if (VARATT_IS_EXTERNAL(DatumGetPointer(value))) { @@ -213,16 +213,16 @@ brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, } /* - * If value is above size target, and is of a compressible datatype, - * try to compress it in-line. + * If value is above size target, and is of a compressible + * datatype, try to compress it in-line. */ if (!VARATT_IS_EXTENDED(DatumGetPointer(value)) && VARSIZE(DatumGetPointer(value)) > TOAST_INDEX_TARGET && (atttype->typstorage == TYPSTORAGE_EXTENDED || atttype->typstorage == TYPSTORAGE_MAIN)) { - Datum cvalue; - char compression; + Datum cvalue; + char compression; Form_pg_attribute att = TupleDescAttr(brdesc->bd_tupdesc, keyno); diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index a4cb8914cc..5212560411 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -103,14 +103,14 @@ index_form_tuple(TupleDesc tupleDescriptor, (att->attstorage == TYPSTORAGE_EXTENDED || att->attstorage == TYPSTORAGE_MAIN)) { - Datum cvalue; - char compression = att->attcompression; + Datum cvalue; + char compression = att->attcompression; /* * If the compression method is not valid, use the default. We * don't expect this to happen for regular index columns, which - * inherit the setting from the corresponding table column, but - * we do expect it to happen whenever an expression is indexed. + * inherit the setting from the corresponding table column, but we + * do expect it to happen whenever an expression is indexed. */ if (!CompressionMethodIsValid(compression)) compression = GetDefaultToastCompression(); diff --git a/src/backend/access/common/toast_compression.c b/src/backend/access/common/toast_compression.c index 682fd70e2e..9e9d4457ac 100644 --- a/src/backend/access/common/toast_compression.c +++ b/src/backend/access/common/toast_compression.c @@ -24,7 +24,7 @@ #include "utils/builtins.h" /* GUC */ -int default_toast_compression = TOAST_PGLZ_COMPRESSION; +int default_toast_compression = TOAST_PGLZ_COMPRESSION; #define NO_LZ4_SUPPORT() \ ereport(ERROR, \ @@ -109,7 +109,7 @@ pglz_decompress_datum(const struct varlena *value) */ struct varlena * pglz_decompress_datum_slice(const struct varlena *value, - int32 slicelength) + int32 slicelength) { struct varlena *result; int32 rawsize; @@ -255,12 +255,12 @@ lz4_decompress_datum_slice(const struct varlena *value, int32 slicelength) ToastCompressionId toast_get_compression_id(struct varlena *attr) { - ToastCompressionId cmid = TOAST_INVALID_COMPRESSION_ID; + ToastCompressionId cmid = TOAST_INVALID_COMPRESSION_ID; /* - * If it is stored externally then fetch the compression method id from the - * external toast pointer. If compressed inline, fetch it from the toast - * compression header. + * If it is stored externally then fetch the compression method id from + * the external toast pointer. If compressed inline, fetch it from the + * toast compression header. */ if (VARATT_IS_EXTERNAL_ONDISK(attr)) { diff --git a/src/backend/access/common/toast_internals.c b/src/backend/access/common/toast_internals.c index 730cd04a2d..c036319a0b 100644 --- a/src/backend/access/common/toast_internals.c +++ b/src/backend/access/common/toast_internals.c @@ -48,7 +48,7 @@ toast_compress_datum(Datum value, char cmethod) { struct varlena *tmp = NULL; int32 valsize; - ToastCompressionId cmid = TOAST_INVALID_COMPRESSION_ID; + ToastCompressionId cmid = TOAST_INVALID_COMPRESSION_ID; Assert(!VARATT_IS_EXTERNAL(DatumGetPointer(value))); Assert(!VARATT_IS_COMPRESSED(DatumGetPointer(value))); diff --git a/src/backend/access/common/tupconvert.c b/src/backend/access/common/tupconvert.c index e055df2f32..64f54393f3 100644 --- a/src/backend/access/common/tupconvert.c +++ b/src/backend/access/common/tupconvert.c @@ -236,7 +236,7 @@ execute_attr_map_slot(AttrMap *attrMap, Bitmapset * execute_attr_map_cols(AttrMap *attrMap, Bitmapset *in_cols) { - Bitmapset *out_cols; + Bitmapset *out_cols; int out_attnum; /* fast path for the common trivial case */ diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index b8a39cd543..d474612b77 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -35,9 +35,9 @@ static bool rtree_internal_consistent(BOX *key, BOX *query, static uint64 point_zorder_internal(float4 x, float4 y); static uint64 part_bits32_by2(uint32 x); static uint32 ieee_float32_to_uint32(float f); -static int gist_bbox_zorder_cmp(Datum a, Datum b, SortSupport ssup); +static int gist_bbox_zorder_cmp(Datum a, Datum b, SortSupport ssup); static Datum gist_bbox_zorder_abbrev_convert(Datum original, SortSupport ssup); -static int gist_bbox_zorder_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup); +static int gist_bbox_zorder_cmp_abbrev(Datum z1, Datum z2, SortSupport ssup); static bool gist_bbox_zorder_abbrev_abort(int memtupcount, SortSupport ssup); diff --git a/src/backend/access/gist/gistvalidate.c b/src/backend/access/gist/gistvalidate.c index 7d83b1143c..b885fa2b25 100644 --- a/src/backend/access/gist/gistvalidate.c +++ b/src/backend/access/gist/gistvalidate.c @@ -267,7 +267,7 @@ gistvalidate(Oid opclassoid) continue; /* got it */ if (i == GIST_DISTANCE_PROC || i == GIST_FETCH_PROC || i == GIST_COMPRESS_PROC || i == GIST_DECOMPRESS_PROC || - i == GIST_OPTIONS_PROC || i == GIST_SORTSUPPORT_PROC) + i == GIST_OPTIONS_PROC || i == GIST_SORTSUPPORT_PROC) continue; /* optional methods */ ereport(INFO, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index ba36da2b83..6ac07f2fda 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -432,11 +432,11 @@ heapgetpage(TableScanDesc sscan, BlockNumber page) * transactions on the primary might still be invisible to a read-only * transaction in the standby. We partly handle this problem by tracking * the minimum xmin of visible tuples as the cut-off XID while marking a - * page all-visible on the primary and WAL log that along with the visibility - * map SET operation. In hot standby, we wait for (or abort) all - * transactions that can potentially may not see one or more tuples on the - * page. That's how index-only scans work fine in hot standby. A crucial - * difference between index-only scans and heap scans is that the + * page all-visible on the primary and WAL log that along with the + * visibility map SET operation. In hot standby, we wait for (or abort) + * all transactions that can potentially may not see one or more tuples on + * the page. That's how index-only scans work fine in hot standby. A + * crucial difference between index-only scans and heap scans is that the * index-only scan completely relies on the visibility map where as heap * scan looks at the page-level PD_ALL_VISIBLE flag. We are not sure if * the page-level flag can be trusted in the same way, because it might @@ -2095,11 +2095,11 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid, /* - * If we're inserting frozen entry into an empty page, - * set visibility map bits and PageAllVisible() hint. + * If we're inserting frozen entry into an empty page, set visibility map + * bits and PageAllVisible() hint. * - * If we're inserting frozen entry into already all_frozen page, - * preserve this state. + * If we're inserting frozen entry into already all_frozen page, preserve + * this state. */ if (options & HEAP_INSERT_FROZEN) { @@ -2109,7 +2109,7 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid, if (visibilitymap_pin_ok(BufferGetBlockNumber(buffer), vmbuffer)) vmstatus = visibilitymap_get_status(relation, - BufferGetBlockNumber(buffer), &vmbuffer); + BufferGetBlockNumber(buffer), &vmbuffer); if ((starting_with_empty_page || vmstatus & VISIBILITYMAP_ALL_FROZEN)) all_frozen_set = true; @@ -2139,8 +2139,8 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid, (options & HEAP_INSERT_SPECULATIVE) != 0); /* - * If the page is all visible, need to clear that, unless we're only - * going to add further frozen rows to it. + * If the page is all visible, need to clear that, unless we're only going + * to add further frozen rows to it. * * If we're only adding already frozen rows to a page that was empty or * marked as all visible, mark it as all-visible. @@ -2258,11 +2258,11 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid, END_CRIT_SECTION(); /* - * If we've frozen everything on the page, update the visibilitymap. - * We're already holding pin on the vmbuffer. + * If we've frozen everything on the page, update the visibilitymap. We're + * already holding pin on the vmbuffer. * - * No need to update the visibilitymap if it had all_frozen bit set - * before this insertion. + * No need to update the visibilitymap if it had all_frozen bit set before + * this insertion. */ if (all_frozen_set && ((vmstatus & VISIBILITYMAP_ALL_FROZEN) == 0)) { @@ -2270,14 +2270,14 @@ heap_insert(Relation relation, HeapTuple tup, CommandId cid, Assert(visibilitymap_pin_ok(BufferGetBlockNumber(buffer), vmbuffer)); /* - * It's fine to use InvalidTransactionId here - this is only used - * when HEAP_INSERT_FROZEN is specified, which intentionally - * violates visibility rules. + * It's fine to use InvalidTransactionId here - this is only used when + * HEAP_INSERT_FROZEN is specified, which intentionally violates + * visibility rules. */ visibilitymap_set(relation, BufferGetBlockNumber(buffer), buffer, - InvalidXLogRecPtr, vmbuffer, - InvalidTransactionId, - VISIBILITYMAP_ALL_VISIBLE | VISIBILITYMAP_ALL_FROZEN); + InvalidXLogRecPtr, vmbuffer, + InvalidTransactionId, + VISIBILITYMAP_ALL_VISIBLE | VISIBILITYMAP_ALL_FROZEN); } UnlockReleaseBuffer(buffer); @@ -2547,7 +2547,7 @@ heap_multi_insert(Relation relation, TupleTableSlot **slots, int ntuples, tupledata = scratchptr; /* check that the mutually exclusive flags are not both set */ - Assert (!(all_visible_cleared && all_frozen_set)); + Assert(!(all_visible_cleared && all_frozen_set)); xlrec->flags = 0; if (all_visible_cleared) @@ -3063,7 +3063,10 @@ l1: xl_heap_header xlhdr; XLogRecPtr recptr; - /* For logical decode we need combo CIDs to properly decode the catalog */ + /* + * For logical decode we need combo CIDs to properly decode the + * catalog + */ if (RelationIsAccessibleInLogicalDecoding(relation)) log_heap_new_cid(relation, &tp); @@ -7932,16 +7935,16 @@ bottomup_sort_and_shrink(TM_IndexDeleteOp *delstate) * TIDs as each other. The goal is to ignore relatively small differences * in the total number of promising entries, so that the whole process can * give a little weight to heapam factors (like heap block locality) - * instead. This isn't a trade-off, really -- we have nothing to lose. - * It would be foolish to interpret small differences in npromisingtids + * instead. This isn't a trade-off, really -- we have nothing to lose. It + * would be foolish to interpret small differences in npromisingtids * values as anything more than noise. * * We tiebreak on nhtids when sorting block group subsets that have the * same npromisingtids, but this has the same issues as npromisingtids, - * and so nhtids is subject to the same power-of-two bucketing scheme. - * The only reason that we don't fix nhtids in the same way here too is - * that we'll need accurate nhtids values after the sort. We handle - * nhtids bucketization dynamically instead (in the sort comparator). + * and so nhtids is subject to the same power-of-two bucketing scheme. The + * only reason that we don't fix nhtids in the same way here too is that + * we'll need accurate nhtids values after the sort. We handle nhtids + * bucketization dynamically instead (in the sort comparator). * * See bottomup_nblocksfavorable() for a full explanation of when and how * heap locality/favorable blocks can significantly influence when and how @@ -8944,8 +8947,8 @@ heap_xlog_insert(XLogReaderState *record) ItemPointerSetOffsetNumber(&target_tid, xlrec->offnum); /* check that the mutually exclusive flags are not both set */ - Assert (!((xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED) && - (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET))); + Assert(!((xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED) && + (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET))); /* * The visibility map may need to be fixed even if the heap page is @@ -9072,8 +9075,8 @@ heap_xlog_multi_insert(XLogReaderState *record) XLogRecGetBlockTag(record, 0, &rnode, NULL, &blkno); /* check that the mutually exclusive flags are not both set */ - Assert (!((xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED) && - (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET))); + Assert(!((xlrec->flags & XLH_INSERT_ALL_VISIBLE_CLEARED) && + (xlrec->flags & XLH_INSERT_ALL_FROZEN_SET))); /* * The visibility map may need to be fixed even if the heap page is diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 7a9a640989..61d9044816 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -1659,13 +1659,13 @@ heapam_index_build_range_scan(Relation heapRelation, offnum = ItemPointerGetOffsetNumber(&heapTuple->t_self); /* - * If a HOT tuple points to a root that we don't know - * about, obtain root items afresh. If that still fails, - * report it as corruption. + * If a HOT tuple points to a root that we don't know about, + * obtain root items afresh. If that still fails, report it as + * corruption. */ if (root_offsets[offnum - 1] == InvalidOffsetNumber) { - Page page = BufferGetPage(hscan->rs_cbuf); + Page page = BufferGetPage(hscan->rs_cbuf); LockBuffer(hscan->rs_cbuf, BUFFER_LOCK_SHARE); heap_get_root_tuples(page, root_offsets); @@ -2482,8 +2482,8 @@ reform_and_rewrite_tuple(HeapTuple tuple, else if (!isnull[i] && TupleDescAttr(newTupDesc, i)->attlen == -1) { struct varlena *new_value; - ToastCompressionId cmid; - char cmethod; + ToastCompressionId cmid; + char cmethod; new_value = (struct varlena *) DatumGetPointer(values[i]); cmid = toast_get_compression_id(new_value); diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c index cc0bed5243..d3c57cd16a 100644 --- a/src/backend/access/heap/heapam_visibility.c +++ b/src/backend/access/heap/heapam_visibility.c @@ -1608,8 +1608,8 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot, /* * another transaction might have (tried to) delete this tuple or - * cmin/cmax was stored in a combo CID. So we need to lookup the actual - * values externally. + * cmin/cmax was stored in a combo CID. So we need to lookup the + * actual values externally. */ resolved = ResolveCminCmaxDuringDecoding(HistoricSnapshotGetTupleCids(), snapshot, htup, buffer, @@ -1629,8 +1629,8 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot, * elog inside ResolveCminCmaxDuringDecoding. * * XXX For the streaming case, we can track the largest combo CID - * assigned, and error out based on this (when unable to resolve - * combo CID below that observed maximum value). + * assigned, and error out based on this (when unable to resolve combo + * CID below that observed maximum value). */ if (!resolved) return false; @@ -1717,8 +1717,8 @@ HeapTupleSatisfiesHistoricMVCC(HeapTuple htup, Snapshot snapshot, * elog inside ResolveCminCmaxDuringDecoding. * * XXX For the streaming case, we can track the largest combo CID - * assigned, and error out based on this (when unable to resolve - * combo CID below that observed maximum value). + * assigned, and error out based on this (when unable to resolve combo + * CID below that observed maximum value). */ if (!resolved || cmax == InvalidCommandId) return true; diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index ffc89685bf..d34edb4190 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -410,8 +410,8 @@ RelationGetBufferForTuple(Relation relation, Size len, } /* - * If the FSM knows nothing of the rel, try the last page before we - * give up and extend. This avoids one-tuple-per-page syndrome during + * If the FSM knows nothing of the rel, try the last page before we give + * up and extend. This avoids one-tuple-per-page syndrome during * bootstrapping or in a recently-started system. */ if (targetBlock == InvalidBlockNumber) diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 0c8e49d3e6..15ca1b304a 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -95,8 +95,8 @@ heap_page_prune_opt(Relation relation, Buffer buffer) /* * We can't write WAL in recovery mode, so there's no point trying to - * clean the page. The primary will likely issue a cleaning WAL record soon - * anyway, so this is no particular loss. + * clean the page. The primary will likely issue a cleaning WAL record + * soon anyway, so this is no particular loss. */ if (RecoveryInProgress()) return; diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 4b4db4c81b..17519a970f 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -691,8 +691,8 @@ heap_vacuum_rel(Relation rel, VacuumParams *params, * * Deliberately avoid telling the stats collector about LP_DEAD items that * remain in the table due to VACUUM bypassing index and heap vacuuming. - * ANALYZE will consider the remaining LP_DEAD items to be dead tuples. - * It seems like a good idea to err on the side of not vacuuming again too + * ANALYZE will consider the remaining LP_DEAD items to be dead tuples. It + * seems like a good idea to err on the side of not vacuuming again too * soon in cases where the failsafe prevented significant amounts of heap * vacuuming. */ @@ -2284,7 +2284,7 @@ static void lazy_vacuum_heap_rel(LVRelState *vacrel) { int tupindex; - BlockNumber vacuumed_pages; + BlockNumber vacuumed_pages; PGRUsage ru0; Buffer vmbuffer = InvalidBuffer; LVSavedErrInfo saved_err_info; diff --git a/src/backend/access/index/genam.c b/src/backend/access/index/genam.c index 0aa26b448b..b93288a6fe 100644 --- a/src/backend/access/index/genam.c +++ b/src/backend/access/index/genam.c @@ -612,8 +612,8 @@ systable_endscan(SysScanDesc sysscan) UnregisterSnapshot(sysscan->snapshot); /* - * Reset the bsysscan flag at the end of the systable scan. See - * detailed comments in xact.c where these variables are declared. + * Reset the bsysscan flag at the end of the systable scan. See detailed + * comments in xact.c where these variables are declared. */ if (TransactionIdIsValid(CheckXidAlive)) bsysscan = false; diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 706e16ae94..ebec8fa5b8 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -1054,22 +1054,22 @@ _bt_lockbuf(Relation rel, Buffer buf, int access) LockBuffer(buf, access); /* - * It doesn't matter that _bt_unlockbuf() won't get called in the - * event of an nbtree error (e.g. a unique violation error). That - * won't cause Valgrind false positives. + * It doesn't matter that _bt_unlockbuf() won't get called in the event of + * an nbtree error (e.g. a unique violation error). That won't cause + * Valgrind false positives. * - * The nbtree client requests are superimposed on top of the - * bufmgr.c buffer pin client requests. In the event of an nbtree - * error the buffer will certainly get marked as defined when the - * backend once again acquires its first pin on the buffer. (Of - * course, if the backend never touches the buffer again then it - * doesn't matter that it remains non-accessible to Valgrind.) + * The nbtree client requests are superimposed on top of the bufmgr.c + * buffer pin client requests. In the event of an nbtree error the buffer + * will certainly get marked as defined when the backend once again + * acquires its first pin on the buffer. (Of course, if the backend never + * touches the buffer again then it doesn't matter that it remains + * non-accessible to Valgrind.) * - * Note: When an IndexTuple C pointer gets computed using an - * ItemId read from a page while a lock was held, the C pointer - * becomes unsafe to dereference forever as soon as the lock is - * released. Valgrind can only detect cases where the pointer - * gets dereferenced with no _current_ lock/pin held, though. + * Note: When an IndexTuple C pointer gets computed using an ItemId read + * from a page while a lock was held, the C pointer becomes unsafe to + * dereference forever as soon as the lock is released. Valgrind can only + * detect cases where the pointer gets dereferenced with no _current_ + * lock/pin held, though. */ if (!RelationUsesLocalBuffers(rel)) VALGRIND_MAKE_MEM_DEFINED(BufferGetPage(buf), BLCKSZ); @@ -2395,7 +2395,7 @@ _bt_unlink_halfdead_page(Relation rel, Buffer leafbuf, BlockNumber scanblkno, opaque = (BTPageOpaque) PageGetSpecialPointer(page); while (P_ISDELETED(opaque) || opaque->btpo_next != target) { - bool leftsibvalid = true; + bool leftsibvalid = true; /* * Before we follow the link from the page that was the left diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c index 1779b6ba47..c2e920f159 100644 --- a/src/backend/access/nbtree/nbtxlog.c +++ b/src/backend/access/nbtree/nbtxlog.c @@ -898,8 +898,8 @@ btree_xlog_unlink_page(uint8 info, XLogReaderState *record) * top parent link when deleting leafbuf because it's the last page * we'll delete in the subtree undergoing deletion. */ - Buffer leafbuf; - IndexTupleData trunctuple; + Buffer leafbuf; + IndexTupleData trunctuple; Assert(!isleaf); diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 1f9f1a1fa1..daab546f29 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -2278,7 +2278,7 @@ SetMultiXactIdLimit(MultiXactId oldest_datminmxid, Oid oldest_datoid, /* Log the info */ ereport(DEBUG1, (errmsg_internal("MultiXactId wrap limit is %u, limited by database with OID %u", - multiWrapLimit, oldest_datoid))); + multiWrapLimit, oldest_datoid))); /* * Computing the actual limits is only possible once the data directory is @@ -2612,7 +2612,7 @@ SetOffsetVacuumLimit(bool is_startup) if (oldestOffsetKnown) ereport(DEBUG1, (errmsg_internal("oldest MultiXactId member is at offset %u", - oldestOffset))); + oldestOffset))); else ereport(LOG, (errmsg("MultiXact member wraparound protections are disabled because oldest checkpointed MultiXact %u does not exist on disk", @@ -2641,7 +2641,7 @@ SetOffsetVacuumLimit(bool is_startup) ereport(DEBUG1, (errmsg_internal("MultiXact member stop limit is now %u based on MultiXact %u", - offsetStopLimit, oldestMultiXactId))); + offsetStopLimit, oldestMultiXactId))); } else if (prevOldestOffsetKnown) { @@ -3283,9 +3283,9 @@ multixact_redo(XLogReaderState *record) xlrec->moff + xlrec->nmembers); /* - * Make sure nextXid is beyond any XID mentioned in the record. - * This should be unnecessary, since any XID found here ought to have - * other evidence in the XLOG, but let's be safe. + * Make sure nextXid is beyond any XID mentioned in the record. This + * should be unnecessary, since any XID found here ought to have other + * evidence in the XLOG, but let's be safe. */ max_xid = XLogRecGetXid(record); for (i = 0; i < xlrec->nmembers; i++) diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 46f3d08249..f67d813c56 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1134,9 +1134,9 @@ EndPrepare(GlobalTransaction gxact) gxact->prepare_start_lsn = ProcLastRecPtr; /* - * Mark the prepared transaction as valid. As soon as xact.c marks - * MyProc as not running our XID (which it will do immediately after - * this function returns), others can commit/rollback the xact. + * Mark the prepared transaction as valid. As soon as xact.c marks MyProc + * as not running our XID (which it will do immediately after this + * function returns), others can commit/rollback the xact. * * NB: a side effect of this is to make a dummy ProcArray entry for the * prepared XID. This must happen before we clear the XID from MyProc / diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c index 142da4aaff..a22bf375f8 100644 --- a/src/backend/access/transam/varsup.c +++ b/src/backend/access/transam/varsup.c @@ -179,10 +179,10 @@ GetNewTransactionId(bool isSubXact) ExtendSUBTRANS(xid); /* - * Now advance the nextXid counter. This must not happen until after - * we have successfully completed ExtendCLOG() --- if that routine fails, - * we want the next incoming transaction to try it again. We cannot - * assign more XIDs until there is CLOG space for them. + * Now advance the nextXid counter. This must not happen until after we + * have successfully completed ExtendCLOG() --- if that routine fails, we + * want the next incoming transaction to try it again. We cannot assign + * more XIDs until there is CLOG space for them. */ FullTransactionIdAdvance(&ShmemVariableCache->nextXid); @@ -192,8 +192,8 @@ GetNewTransactionId(bool isSubXact) * latestCompletedXid is present in the ProcArray, which is essential for * correct OldestXmin tracking; see src/backend/access/transam/README. * - * Note that readers of ProcGlobal->xids/PGPROC->xid should be careful - * to fetch the value for each proc only once, rather than assume they can + * Note that readers of ProcGlobal->xids/PGPROC->xid should be careful to + * fetch the value for each proc only once, rather than assume they can * read a value multiple times and get the same answer each time. Note we * are assuming that TransactionId and int fetch/store are atomic. * @@ -281,9 +281,9 @@ AdvanceNextFullTransactionIdPastXid(TransactionId xid) uint32 epoch; /* - * It is safe to read nextXid without a lock, because this is only - * called from the startup process or single-process mode, meaning that no - * other process can modify it. + * It is safe to read nextXid without a lock, because this is only called + * from the startup process or single-process mode, meaning that no other + * process can modify it. */ Assert(AmStartupProcess() || !IsUnderPostmaster); @@ -426,7 +426,7 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid) /* Log the info */ ereport(DEBUG1, (errmsg_internal("transaction ID wrap limit is %u, limited by database with OID %u", - xidWrapLimit, oldest_datoid))); + xidWrapLimit, oldest_datoid))); /* * If past the autovacuum force point, immediately signal an autovac @@ -617,8 +617,8 @@ AssertTransactionIdInAllowableRange(TransactionId xid) * We can't acquire XidGenLock, as this may be called with XidGenLock * already held (or with other locks that don't allow XidGenLock to be * nested). That's ok for our purposes though, since we already rely on - * 32bit reads to be atomic. While nextXid is 64 bit, we only look at - * the lower 32bit, so a skewed read doesn't hurt. + * 32bit reads to be atomic. While nextXid is 64 bit, we only look at the + * lower 32bit, so a skewed read doesn't hurt. * * There's no increased danger of falling outside [oldest, next] by * accessing them without a lock. xid needs to have been created with diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index c1d4415a43..8d163f190f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -723,7 +723,7 @@ typedef struct XLogCtlData */ TimestampTz currentChunkStartTime; /* Recovery pause state */ - RecoveryPauseState recoveryPauseState; + RecoveryPauseState recoveryPauseState; ConditionVariable recoveryNotPausedCV; /* @@ -2858,8 +2858,8 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force) ereport(DEBUG2, (errmsg_internal("updated min recovery point to %X/%X on timeline %u", - LSN_FORMAT_ARGS(minRecoveryPoint), - newMinRecoveryPointTLI))); + LSN_FORMAT_ARGS(minRecoveryPoint), + newMinRecoveryPointTLI))); } } LWLockRelease(ControlFileLock); @@ -3357,7 +3357,7 @@ XLogFileInit(XLogSegNo logsegno, bool *use_existent, bool use_lock) blocks = wal_segment_size / XLOG_BLCKSZ; for (int i = 0; i < blocks;) { - int iovcnt = Min(blocks - i, lengthof(iov)); + int iovcnt = Min(blocks - i, lengthof(iov)); off_t offset = i * XLOG_BLCKSZ; if (pg_pwritev_with_retry(fd, iov, iovcnt, offset) < 0) @@ -3814,8 +3814,8 @@ XLogFileReadAnyTLI(XLogSegNo segno, int emode, XLogSource source) * however, unless we actually find a valid segment. That way if there is * neither a timeline history file nor a WAL segment in the archive, and * streaming replication is set up, we'll read the timeline history file - * streamed from the primary when we start streaming, instead of recovering - * with a dummy history generated here. + * streamed from the primary when we start streaming, instead of + * recovering with a dummy history generated here. */ if (expectedTLEs) tles = expectedTLEs; @@ -4229,7 +4229,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo, { ereport(DEBUG2, (errmsg_internal("recycled write-ahead log file \"%s\"", - segname))); + segname))); CheckpointStats.ckpt_segs_recycled++; /* Needn't recheck that slot on future iterations */ (*endlogSegNo)++; @@ -4241,7 +4241,7 @@ RemoveXlogFile(const char *segname, XLogSegNo recycleSegNo, ereport(DEBUG2, (errmsg_internal("removing write-ahead log file \"%s\"", - segname))); + segname))); #ifdef WIN32 @@ -6093,7 +6093,7 @@ recoveryPausesHere(bool endOfRecovery) RecoveryPauseState GetRecoveryPauseState(void) { - RecoveryPauseState state; + RecoveryPauseState state; SpinLockAcquire(&XLogCtl->info_lck); state = XLogCtl->recoveryPauseState; @@ -6347,7 +6347,11 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("promotion is not possible because of insufficient parameter settings"), - /* Repeat the detail from above so it's easy to find in the log. */ + + /* + * Repeat the detail from above so it's easy to find + * in the log. + */ errdetail("%s = %d is a lower setting than on the primary server, where its value was %d.", param_name, currValue, @@ -6357,15 +6361,15 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue } /* - * If recovery pause is requested then set it paused. While we - * are in the loop, user might resume and pause again so set - * this every time. + * If recovery pause is requested then set it paused. While + * we are in the loop, user might resume and pause again so + * set this every time. */ ConfirmRecoveryPaused(); /* - * We wait on a condition variable that will wake us as soon as - * the pause ends, but we use a timeout so we can check the + * We wait on a condition variable that will wake us as soon + * as the pause ends, but we use a timeout so we can check the * above conditions periodically too. */ ConditionVariableTimedSleep(&XLogCtl->recoveryNotPausedCV, 1000, @@ -6377,7 +6381,7 @@ RecoveryRequiresIntParameter(const char *param_name, int currValue, int minValue ereport(FATAL, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("recovery aborted because of insufficient parameter settings"), - /* Repeat the detail from above so it's easy to find in the log. */ + /* Repeat the detail from above so it's easy to find in the log. */ errdetail("%s = %d is a lower setting than on the primary server, where its value was %d.", param_name, currValue, @@ -6920,9 +6924,8 @@ StartupXLOG(void) StartupReorderBuffer(); /* - * Startup CLOG. This must be done after ShmemVariableCache->nextXid - * has been initialized and before we accept connections or begin WAL - * replay. + * Startup CLOG. This must be done after ShmemVariableCache->nextXid has + * been initialized and before we accept connections or begin WAL replay. */ StartupCLOG(); @@ -6969,11 +6972,11 @@ StartupXLOG(void) * ourselves - the history file of the recovery target timeline covers all * the previous timelines in the history too - a cascading standby server * might be interested in them. Or, if you archive the WAL from this - * server to a different archive than the primary, it'd be good for all the - * history files to get archived there after failover, so that you can use - * one of the old timelines as a PITR target. Timeline history files are - * small, so it's better to copy them unnecessarily than not copy them and - * regret later. + * server to a different archive than the primary, it'd be good for all + * the history files to get archived there after failover, so that you can + * use one of the old timelines as a PITR target. Timeline history files + * are small, so it's better to copy them unnecessarily than not copy them + * and regret later. */ restoreTimeLineHistoryFiles(ThisTimeLineID, recoveryTargetTLI); @@ -7196,9 +7199,9 @@ StartupXLOG(void) ProcArrayInitRecovery(XidFromFullTransactionId(ShmemVariableCache->nextXid)); /* - * Startup subtrans only. CLOG, MultiXact and commit - * timestamp have already been started up and other SLRUs are not - * maintained during recovery and need not be started yet. + * Startup subtrans only. CLOG, MultiXact and commit timestamp + * have already been started up and other SLRUs are not maintained + * during recovery and need not be started yet. */ StartupSUBTRANS(oldestActiveXID); @@ -7400,8 +7403,7 @@ StartupXLOG(void) error_context_stack = &errcallback; /* - * ShmemVariableCache->nextXid must be beyond record's - * xid. + * ShmemVariableCache->nextXid must be beyond record's xid. */ AdvanceNextFullTransactionIdPastXid(record->xl_xid); @@ -8092,10 +8094,10 @@ StartupXLOG(void) WalSndWakeup(); /* - * If this was a promotion, request an (online) checkpoint now. This - * isn't required for consistency, but the last restartpoint might be far - * back, and in case of a crash, recovering from it might take a longer - * than is appropriate now that we're not in standby mode anymore. + * If this was a promotion, request an (online) checkpoint now. This isn't + * required for consistency, but the last restartpoint might be far back, + * and in case of a crash, recovering from it might take a longer than is + * appropriate now that we're not in standby mode anymore. */ if (promoted) RequestCheckpoint(CHECKPOINT_FORCE); @@ -8674,7 +8676,7 @@ LogCheckpointStart(int flags, bool restartpoint) { if (restartpoint) ereport(LOG, - /* translator: the placeholders show checkpoint options */ + /* translator: the placeholders show checkpoint options */ (errmsg("restartpoint starting:%s%s%s%s%s%s%s%s", (flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "", (flags & CHECKPOINT_END_OF_RECOVERY) ? " end-of-recovery" : "", @@ -8686,7 +8688,7 @@ LogCheckpointStart(int flags, bool restartpoint) (flags & CHECKPOINT_FLUSH_ALL) ? " flush-all" : ""))); else ereport(LOG, - /* translator: the placeholders show checkpoint options */ + /* translator: the placeholders show checkpoint options */ (errmsg("checkpoint starting:%s%s%s%s%s%s%s%s", (flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "", (flags & CHECKPOINT_END_OF_RECOVERY) ? " end-of-recovery" : "", @@ -11851,12 +11853,12 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, if (fscanf(lfp, "START TIME: %127[^\n]\n", backuptime) == 1) ereport(DEBUG1, (errmsg_internal("backup time %s in file \"%s\"", - backuptime, BACKUP_LABEL_FILE))); + backuptime, BACKUP_LABEL_FILE))); if (fscanf(lfp, "LABEL: %1023[^\n]\n", backuplabel) == 1) ereport(DEBUG1, (errmsg_internal("backup label %s in file \"%s\"", - backuplabel, BACKUP_LABEL_FILE))); + backuplabel, BACKUP_LABEL_FILE))); /* * START TIMELINE is new as of 11. Its parsing is not mandatory, still use @@ -11873,7 +11875,7 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, ereport(DEBUG1, (errmsg_internal("backup timeline %u in file \"%s\"", - tli_from_file, BACKUP_LABEL_FILE))); + tli_from_file, BACKUP_LABEL_FILE))); } if (ferror(lfp) || FreeFile(lfp)) @@ -12177,8 +12179,8 @@ retry: Assert(readFile != -1); /* - * If the current segment is being streamed from the primary, calculate how - * much of the current page we have received already. We know the + * If the current segment is being streamed from the primary, calculate + * how much of the current page we have received already. We know the * requested record has been received, but this is for the benefit of * future calls, to allow quick exit at the top of this function. */ @@ -12239,12 +12241,13 @@ retry: * and replay reaches a record that's split across two WAL segments. The * first page is only available locally, in pg_wal, because it's already * been recycled on the primary. The second page, however, is not present - * in pg_wal, and we should stream it from the primary. There is a recycled - * WAL segment present in pg_wal, with garbage contents, however. We would - * read the first page from the local WAL segment, but when reading the - * second page, we would read the bogus, recycled, WAL segment. If we - * didn't catch that case here, we would never recover, because - * ReadRecord() would retry reading the whole record from the beginning. + * in pg_wal, and we should stream it from the primary. There is a + * recycled WAL segment present in pg_wal, with garbage contents, however. + * We would read the first page from the local WAL segment, but when + * reading the second page, we would read the bogus, recycled, WAL + * segment. If we didn't catch that case here, we would never recover, + * because ReadRecord() would retry reading the whole record from the + * beginning. * * Of course, this only catches errors in the page header, which is what * happens in the case of a recycled WAL segment. Other kinds of errors or @@ -12399,15 +12402,15 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, * Failure while streaming. Most likely, we got here * because streaming replication was terminated, or * promotion was triggered. But we also get here if we - * find an invalid record in the WAL streamed from the primary, - * in which case something is seriously wrong. There's - * little chance that the problem will just go away, but - * PANIC is not good for availability either, especially - * in hot standby mode. So, we treat that the same as - * disconnection, and retry from archive/pg_wal again. The - * WAL in the archive should be identical to what was - * streamed, so it's unlikely that it helps, but one can - * hope... + * find an invalid record in the WAL streamed from the + * primary, in which case something is seriously wrong. + * There's little chance that the problem will just go + * away, but PANIC is not good for availability either, + * especially in hot standby mode. So, we treat that the + * same as disconnection, and retry from archive/pg_wal + * again. The WAL in the archive should be identical to + * what was streamed, so it's unlikely that it helps, but + * one can hope... */ /* diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index f363a4c639..b98deb72ec 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -600,7 +600,7 @@ pg_is_wal_replay_paused(PG_FUNCTION_ARGS) Datum pg_get_wal_replay_pause_state(PG_FUNCTION_ARGS) { - char *statestr = NULL; + char *statestr = NULL; if (!RecoveryInProgress()) ereport(ERROR, @@ -609,7 +609,7 @@ pg_get_wal_replay_pause_state(PG_FUNCTION_ARGS) errhint("Recovery control functions can only be executed during recovery."))); /* get the recovery pause state */ - switch(GetRecoveryPauseState()) + switch (GetRecoveryPauseState()) { case RECOVERY_NOT_PAUSED: statestr = "not paused"; diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index 7052dc245e..32b4cc84e7 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -1065,8 +1065,8 @@ log_newpages(RelFileNode *rnode, ForkNumber forkNum, int num_pages, for (j = batch_start; j < i; j++) { /* - * The page may be uninitialized. If so, we can't set the LSN because that - * would corrupt the page. + * The page may be uninitialized. If so, we can't set the LSN + * because that would corrupt the page. */ if (!PageIsNew(pages[j])) { diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index 174727b501..b155237488 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -160,7 +160,7 @@ struct typmap FormData_pg_type am_typ; }; -static List *Typ = NIL; /* List of struct typmap* */ +static List *Typ = NIL; /* List of struct typmap* */ static struct typmap *Ap = NULL; static Datum values[MAXATTR]; /* current row's attribute values */ @@ -926,11 +926,12 @@ gettype(char *type) { if (Typ != NIL) { - ListCell *lc; + ListCell *lc; - foreach (lc, Typ) + foreach(lc, Typ) { struct typmap *app = lfirst(lc); + if (strncmp(NameStr(app->am_typ.typname), type, NAMEDATALEN) == 0) { Ap = app; @@ -948,12 +949,13 @@ gettype(char *type) populate_typ_list(); /* - * Calling gettype would result in infinite recursion for types missing - * in pg_type, so just repeat the lookup. + * Calling gettype would result in infinite recursion for types + * missing in pg_type, so just repeat the lookup. */ - foreach (lc, Typ) + foreach(lc, Typ) { struct typmap *app = lfirst(lc); + if (strncmp(NameStr(app->am_typ.typname), type, NAMEDATALEN) == 0) { Ap = app; @@ -1004,9 +1006,9 @@ boot_get_type_io_data(Oid typid, { /* We have the boot-time contents of pg_type, so use it */ struct typmap *ap = NULL; - ListCell *lc; + ListCell *lc; - foreach (lc, Typ) + foreach(lc, Typ) { ap = lfirst(lc); if (ap->am_oid == typid) diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm index b44d568b54..a5e9869378 100644 --- a/src/backend/catalog/Catalog.pm +++ b/src/backend/catalog/Catalog.pm @@ -94,18 +94,21 @@ sub ParseHeader push @{ $catalog{toasting} }, { parent_table => $1, toast_oid => $2, toast_index_oid => $3 }; } - elsif (/^DECLARE_(UNIQUE_)?INDEX(_PKEY)?\(\s*(\w+),\s*(\d+),\s*(.+)\)/) + elsif ( + /^DECLARE_(UNIQUE_)?INDEX(_PKEY)?\(\s*(\w+),\s*(\d+),\s*(.+)\)/) { push @{ $catalog{indexing} }, - { + { is_unique => $1 ? 1 : 0, - is_pkey => $2 ? 1 : 0, + is_pkey => $2 ? 1 : 0, index_name => $3, index_oid => $4, index_decl => $5 }; } - elsif (/^DECLARE_(ARRAY_)?FOREIGN_KEY(_OPT)?\(\s*\(([^)]+)\),\s*(\w+),\s*\(([^)]+)\)\)/) + elsif ( + /^DECLARE_(ARRAY_)?FOREIGN_KEY(_OPT)?\(\s*\(([^)]+)\),\s*(\w+),\s*\(([^)]+)\)\)/ + ) { push @{ $catalog{foreign_keys} }, { diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index e1573eb398..53392414f1 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -3926,8 +3926,8 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask, ReleaseSysCache(tuple); /* - * Check if ACL_SELECT is being checked and, if so, and not set already - * as part of the result, then check if the user is a member of the + * Check if ACL_SELECT is being checked and, if so, and not set already as + * part of the result, then check if the user is a member of the * pg_read_all_data role, which allows read access to all relations. */ if (mask & ACL_SELECT && !(result & ACL_SELECT) && @@ -3935,14 +3935,14 @@ pg_class_aclmask_ext(Oid table_oid, Oid roleid, AclMode mask, result |= ACL_SELECT; /* - * Check if ACL_INSERT, ACL_UPDATE, or ACL_DELETE is being checked - * and, if so, and not set already as part of the result, then check - * if the user is a member of the pg_write_all_data role, which - * allows INSERT/UPDATE/DELETE access to all relations (except - * system catalogs, which requires superuser, see above). + * Check if ACL_INSERT, ACL_UPDATE, or ACL_DELETE is being checked and, if + * so, and not set already as part of the result, then check if the user + * is a member of the pg_write_all_data role, which allows + * INSERT/UPDATE/DELETE access to all relations (except system catalogs, + * which requires superuser, see above). */ if (mask & (ACL_INSERT | ACL_UPDATE | ACL_DELETE) && - !(result & (ACL_INSERT | ACL_UPDATE | ACL_DELETE)) && + !(result & (ACL_INSERT | ACL_UPDATE | ACL_DELETE)) && has_privs_of_role(roleid, ROLE_PG_WRITE_ALL_DATA)) result |= (mask & (ACL_INSERT | ACL_UPDATE | ACL_DELETE)); @@ -4273,10 +4273,10 @@ pg_namespace_aclmask(Oid nsp_oid, Oid roleid, ReleaseSysCache(tuple); /* - * Check if ACL_USAGE is being checked and, if so, and not set already - * as part of the result, then check if the user is a member of the - * pg_read_all_data or pg_write_all_data roles, which allow usage - * access to all schemas. + * Check if ACL_USAGE is being checked and, if so, and not set already as + * part of the result, then check if the user is a member of the + * pg_read_all_data or pg_write_all_data roles, which allow usage access + * to all schemas. */ if (mask & ACL_USAGE && !(result & ACL_USAGE) && (has_privs_of_role(roleid, ROLE_PG_READ_ALL_DATA) || @@ -4568,7 +4568,7 @@ pg_attribute_aclcheck(Oid table_oid, AttrNumber attnum, */ AclResult pg_attribute_aclcheck_ext(Oid table_oid, AttrNumber attnum, - Oid roleid, AclMode mode, bool *is_missing) + Oid roleid, AclMode mode, bool *is_missing) { if (pg_attribute_aclmask_ext(table_oid, attnum, roleid, mode, ACLMASK_ANY, is_missing) != 0) diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index 259cde3397..0c37fc1d53 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -1120,7 +1120,7 @@ reportDependentObjects(const ObjectAddresses *targetObjects, */ ereport(DEBUG2, (errmsg_internal("drop auto-cascades to %s", - objDesc))); + objDesc))); } else if (behavior == DROP_RESTRICT) { diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl index 9586c29ad0..bf080b5f12 100644 --- a/src/backend/catalog/genbki.pl +++ b/src/backend/catalog/genbki.pl @@ -786,9 +786,9 @@ close $fk_info; close $constraints; # Finally, rename the completed files into place. -Catalog::RenameTempFile($bkifile, $tmpext); -Catalog::RenameTempFile($schemafile, $tmpext); -Catalog::RenameTempFile($fk_info_file, $tmpext); +Catalog::RenameTempFile($bkifile, $tmpext); +Catalog::RenameTempFile($schemafile, $tmpext); +Catalog::RenameTempFile($fk_info_file, $tmpext); Catalog::RenameTempFile($constraints_file, $tmpext); exit 0; diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 8ded2b53d4..0f8cfae4ec 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -382,8 +382,8 @@ ConstructTupleDescriptor(Relation heapRelation, * For expression columns, set attcompression invalid, since * there's no table column from which to copy the value. Whenever * we actually need to compress a value, we'll use whatever the - * current value of default_compression_method is at that point - * in time. + * current value of default_compression_method is at that point in + * time. */ to->attcompression = InvalidCompressionMethod; @@ -2927,14 +2927,14 @@ index_build(Relation heapRelation, if (indexInfo->ii_ParallelWorkers == 0) ereport(DEBUG1, (errmsg_internal("building index \"%s\" on table \"%s\" serially", - RelationGetRelationName(indexRelation), - RelationGetRelationName(heapRelation)))); + RelationGetRelationName(indexRelation), + RelationGetRelationName(heapRelation)))); else ereport(DEBUG1, (errmsg_internal("building index \"%s\" on table \"%s\" with request for %d parallel workers", - RelationGetRelationName(indexRelation), - RelationGetRelationName(heapRelation), - indexInfo->ii_ParallelWorkers))); + RelationGetRelationName(indexRelation), + RelationGetRelationName(heapRelation), + indexInfo->ii_ParallelWorkers))); /* * Switch to the table owner's userid, so that any index functions are run @@ -3619,8 +3619,7 @@ reindex_index(Oid indexId, bool skip_constraint_checks, char persistence, SetRelationTableSpace(iRel, params->tablespaceOid, InvalidOid); /* - * Schedule unlinking of the old index storage at transaction - * commit. + * Schedule unlinking of the old index storage at transaction commit. */ RelationDropStorage(iRel); RelationAssumeNewRelfilenode(iRel); diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index d1d7a10b43..d79c3cde7c 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -96,7 +96,8 @@ */ typedef struct { - const char *class_descr; /* string describing the catalog, for internal error messages */ + const char *class_descr; /* string describing the catalog, for internal + * error messages */ Oid class_oid; /* oid of catalog */ Oid oid_index_oid; /* oid of index on system oid column */ int oid_catcache_id; /* id of catcache on system oid column */ @@ -2871,6 +2872,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) char *attname = get_attname(object->objectId, object->objectSubId, missing_ok); + if (!attname) break; @@ -2888,6 +2890,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) bits16 flags = FORMAT_PROC_INVALID_AS_NULL; char *proname = format_procedure_extended(object->objectId, flags); + if (proname == NULL) break; @@ -2900,6 +2903,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) bits16 flags = FORMAT_TYPE_INVALID_AS_NULL; char *typname = format_type_extended(object->objectId, -1, flags); + if (typname == NULL) break; @@ -3861,6 +3865,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) { char *pubname = get_publication_name(object->objectId, missing_ok); + if (pubname) appendStringInfo(&buffer, _("publication %s"), pubname); break; @@ -3901,6 +3906,7 @@ getObjectDescription(const ObjectAddress *object, bool missing_ok) { char *subname = get_subscription_name(object->objectId, missing_ok); + if (subname) appendStringInfo(&buffer, _("subscription %s"), subname); break; @@ -4708,6 +4714,7 @@ getObjectIdentityParts(const ObjectAddress *object, bits16 flags = FORMAT_PROC_FORCE_QUALIFY | FORMAT_PROC_INVALID_AS_NULL; char *proname = format_procedure_extended(object->objectId, flags); + if (proname == NULL) break; @@ -4957,6 +4964,7 @@ getObjectIdentityParts(const ObjectAddress *object, bits16 flags = FORMAT_OPERATOR_FORCE_QUALIFY | FORMAT_OPERATOR_INVALID_AS_NULL; char *oprname = format_operator_extended(object->objectId, flags); + if (oprname == NULL) break; diff --git a/src/backend/catalog/pg_inherits.c b/src/backend/catalog/pg_inherits.c index c373faf2d6..1c37a438c3 100644 --- a/src/backend/catalog/pg_inherits.c +++ b/src/backend/catalog/pg_inherits.c @@ -578,7 +578,7 @@ DeleteInheritsTuple(Oid inhrelid, Oid inhparent, bool expect_detach_pending, parent = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhparent; if (!OidIsValid(inhparent) || parent == inhparent) { - bool detach_pending; + bool detach_pending; detach_pending = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhdetachpending; @@ -640,7 +640,7 @@ PartitionHasPendingDetach(Oid partoid) while (HeapTupleIsValid(inheritsTuple = systable_getnext(scan))) { - bool detached; + bool detached; detached = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhdetachpending; diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index 478dbde3fe..5403110820 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -903,10 +903,10 @@ fmgr_sql_validator(PG_FUNCTION_ARGS) else { /* - * We can't do full prechecking of the function definition if there - * are any polymorphic input types, because actual datatypes of - * expression results will be unresolvable. The check will be done at - * runtime instead. + * We can't do full prechecking of the function definition if + * there are any polymorphic input types, because actual datatypes + * of expression results will be unresolvable. The check will be + * done at runtime instead. * * We can run the text through the raw parser though; this will at * least catch silly syntactic errors. @@ -917,8 +917,8 @@ fmgr_sql_validator(PG_FUNCTION_ARGS) if (!haspolyarg) { /* - * OK to do full precheck: analyze and rewrite the queries, then - * verify the result type. + * OK to do full precheck: analyze and rewrite the queries, + * then verify the result type. */ SQLFunctionParseInfoPtr pinfo; diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c index 90b7a5de29..420ad96565 100644 --- a/src/backend/catalog/pg_shdepend.c +++ b/src/backend/catalog/pg_shdepend.c @@ -361,7 +361,7 @@ void recordDependencyOnTablespace(Oid classId, Oid objectId, Oid tablespace) { ObjectAddress myself, - referenced; + referenced; ObjectAddressSet(myself, classId, objectId); ObjectAddressSet(referenced, TableSpaceRelationId, tablespace); diff --git a/src/backend/catalog/pg_subscription.c b/src/backend/catalog/pg_subscription.c index 7db1f7df08..29fc4218cd 100644 --- a/src/backend/catalog/pg_subscription.c +++ b/src/backend/catalog/pg_subscription.c @@ -433,6 +433,7 @@ RemoveSubscriptionRel(Oid subid, Oid relid) get_subscription_name(subrel->srsubid, false)), errdetail("Table synchronization for relation \"%s\" is in progress and is in state \"%c\".", get_rel_name(relid), subrel->srsubstate), + /* * translator: first %s is a SQL ALTER command and second %s is a * SQL DROP command diff --git a/src/backend/catalog/toasting.c b/src/backend/catalog/toasting.c index 933a0734d1..bf81f6ccc5 100644 --- a/src/backend/catalog/toasting.c +++ b/src/backend/catalog/toasting.c @@ -351,9 +351,8 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid, table_close(class_rel, RowExclusiveLock); /* - * Register dependency from the toast table to the main, so that the - * toast table will be deleted if the main is. Skip this in bootstrap - * mode. + * Register dependency from the toast table to the main, so that the toast + * table will be deleted if the main is. Skip this in bootstrap mode. */ if (!IsBootstrapProcessingMode()) { @@ -396,9 +395,9 @@ needs_toast_table(Relation rel) /* * Ignore attempts to create toast tables on catalog tables after initdb. - * Which catalogs get toast tables is explicitly chosen in - * catalog/pg_*.h. (We could get here via some ALTER TABLE command if - * the catalog doesn't have a toast table.) + * Which catalogs get toast tables is explicitly chosen in catalog/pg_*.h. + * (We could get here via some ALTER TABLE command if the catalog doesn't + * have a toast table.) */ if (IsCatalogRelation(rel) && !IsBootstrapProcessingMode()) return false; diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index 8aa329a2a0..426c1e6710 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -617,11 +617,10 @@ do_analyze_rel(Relation onerel, VacuumParams *params, * * We assume that VACUUM hasn't set pg_class.reltuples already, even * during a VACUUM ANALYZE. Although VACUUM often updates pg_class, - * exceptions exist. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command - * will never update pg_class entries for index relations. It's also - * possible that an individual index's pg_class entry won't be updated - * during VACUUM if the index AM returns NULL from its amvacuumcleanup() - * routine. + * exceptions exist. A "VACUUM (ANALYZE, INDEX_CLEANUP OFF)" command will + * never update pg_class entries for index relations. It's also possible + * that an individual index's pg_class entry won't be updated during + * VACUUM if the index AM returns NULL from its amvacuumcleanup() routine. */ if (!inh) { @@ -659,9 +658,9 @@ do_analyze_rel(Relation onerel, VacuumParams *params, else if (onerel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE) { /* - * Partitioned tables don't have storage, so we don't set any fields in - * their pg_class entries except for reltuples, which is necessary for - * auto-analyze to work properly. + * Partitioned tables don't have storage, so we don't set any fields + * in their pg_class entries except for reltuples, which is necessary + * for auto-analyze to work properly. */ vac_update_relstats(onerel, -1, totalrows, 0, false, InvalidTransactionId, diff --git a/src/backend/commands/copyto.c b/src/backend/commands/copyto.c index 67bac9ccab..89a4f8f810 100644 --- a/src/backend/commands/copyto.c +++ b/src/backend/commands/copyto.c @@ -104,7 +104,7 @@ typedef struct CopyToStateData typedef struct { DestReceiver pub; /* publicly-known function pointers */ - CopyToState cstate; /* CopyToStateData for the command */ + CopyToState cstate; /* CopyToStateData for the command */ uint64 processed; /* # of tuples processed */ } DR_copy; @@ -348,7 +348,7 @@ BeginCopyTo(ParseState *pstate, List *attnamelist, List *options) { - CopyToState cstate; + CopyToState cstate; bool pipe = (filename == NULL); TupleDesc tupDesc; int num_phys_attrs; @@ -415,7 +415,7 @@ BeginCopyTo(ParseState *pstate, oldcontext = MemoryContextSwitchTo(cstate->copycontext); /* Extract options from the statement node tree */ - ProcessCopyOptions(pstate, &cstate->opts, false /* is_from */, options); + ProcessCopyOptions(pstate, &cstate->opts, false /* is_from */ , options); /* Process the source/target relation or query */ if (rel) @@ -793,7 +793,7 @@ DoCopyTo(CopyToState cstate) else tupDesc = cstate->queryDesc->tupDesc; num_phys_attrs = tupDesc->natts; - cstate->opts.null_print_client = cstate->opts.null_print; /* default */ + cstate->opts.null_print_client = cstate->opts.null_print; /* default */ /* We use fe_msgbuf as a per-row buffer regardless of copy_dest */ cstate->fe_msgbuf = makeStringInfo(); @@ -850,8 +850,8 @@ DoCopyTo(CopyToState cstate) */ if (cstate->need_transcoding) cstate->opts.null_print_client = pg_server_to_any(cstate->opts.null_print, - cstate->opts.null_print_len, - cstate->file_encoding); + cstate->opts.null_print_len, + cstate->file_encoding); /* if a header has been requested send the line */ if (cstate->opts.header_line) @@ -1265,7 +1265,7 @@ static bool copy_dest_receive(TupleTableSlot *slot, DestReceiver *self) { DR_copy *myState = (DR_copy *) self; - CopyToState cstate = myState->cstate; + CopyToState cstate = myState->cstate; /* Send the data */ CopyOneRowTo(cstate, slot); diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index 9867da83bc..1202bf85a3 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -167,7 +167,7 @@ ExplainQuery(ParseState *pstate, ExplainStmt *stmt, ExplainState *es = NewExplainState(); TupOutputState *tstate; JumbleState *jstate = NULL; - Query *query; + Query *query; List *rewritten; ListCell *lc; bool timing_set = false; @@ -458,7 +458,7 @@ ExplainOneUtility(Node *utilityStmt, IntoClause *into, ExplainState *es, else if (ctas->objtype == OBJECT_MATVIEW) ExplainDummyGroup("CREATE MATERIALIZED VIEW", NULL, es); else - elog(ERROR, "unexpected object type: %d", + elog(ERROR, "unexpected object type: %d", (int) ctas->objtype); return; } @@ -612,7 +612,7 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es, if (es->verbose && plannedstmt->queryId != UINT64CONST(0)) { - char buf[MAXINT8LEN+1]; + char buf[MAXINT8LEN + 1]; pg_lltoa(plannedstmt->queryId, buf); ExplainPropertyText("Query Identifier", buf, es); @@ -3298,7 +3298,7 @@ show_hashagg_info(AggState *aggstate, ExplainState *es) if (aggstate->hash_batches_used > 1) { appendStringInfo(es->str, " Disk Usage: " UINT64_FORMAT "kB", - aggstate->hash_disk_used); + aggstate->hash_disk_used); } } diff --git a/src/backend/commands/extension.c b/src/backend/commands/extension.c index 19db329fe6..008505368c 100644 --- a/src/backend/commands/extension.c +++ b/src/backend/commands/extension.c @@ -3293,8 +3293,8 @@ ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt, case OBJECT_SUBSCRIPTION: case OBJECT_TABLESPACE: ereport(ERROR, - (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("cannot add an object of this type to an extension"))); + (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), + errmsg("cannot add an object of this type to an extension"))); break; default: /* OK */ diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 3edf61993a..76774dce06 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -1086,9 +1086,9 @@ DefineIndex(Oid relationId, ereport(DEBUG1, (errmsg_internal("%s %s will create implicit index \"%s\" for table \"%s\"", - is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /", - constraint_type, - indexRelationName, RelationGetRelationName(rel)))); + is_alter_table ? "ALTER TABLE / ADD" : "CREATE TABLE /", + constraint_type, + indexRelationName, RelationGetRelationName(rel)))); } /* diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index bbb2f5d029..8aa6de1785 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -628,7 +628,7 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data) InvalidXLogRecPtr); ereport(DEBUG1, (errmsg_internal("table \"%s.%s\" added to subscription \"%s\"", - rv->schemaname, rv->relname, sub->name))); + rv->schemaname, rv->relname, sub->name))); } } @@ -702,9 +702,9 @@ AlterSubscription_refresh(Subscription *sub, bool copy_data) ereport(DEBUG1, (errmsg_internal("table \"%s.%s\" removed from subscription \"%s\"", - get_namespace_name(get_rel_namespace(relid)), - get_rel_name(relid), - sub->name))); + get_namespace_name(get_rel_namespace(relid)), + get_rel_name(relid), + sub->name))); } } diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 591bf01189..ebc62034d2 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -563,7 +563,7 @@ static void ATExecGenericOptions(Relation rel, List *options); static void ATExecSetRowSecurity(Relation rel, bool rls); static void ATExecForceNoForceRowSecurity(Relation rel, bool force_rls); static ObjectAddress ATExecSetCompression(AlteredTableInfo *tab, Relation rel, - const char *column, Node *newValue, LOCKMODE lockmode); + const char *column, Node *newValue, LOCKMODE lockmode); static void index_copy_data(Relation rel, RelFileNode newrnode); static const char *storage_name(char c); @@ -2593,7 +2593,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, if (CompressionMethodIsValid(attribute->attcompression)) { const char *compression = - GetCompressionMethodName(attribute->attcompression); + GetCompressionMethodName(attribute->attcompression); if (def->compression == NULL) def->compression = pstrdup(compression); @@ -2641,7 +2641,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, def->location = -1; if (CompressionMethodIsValid(attribute->attcompression)) def->compression = pstrdup(GetCompressionMethodName( - attribute->attcompression)); + attribute->attcompression)); else def->compression = NULL; inhSchema = lappend(inhSchema, def); @@ -4524,7 +4524,7 @@ ATPrepCmd(List **wqueue, Relation rel, AlterTableCmd *cmd, /* No command-specific prep needed */ pass = AT_PASS_MISC; break; - case AT_SetCompression: /* ALTER COLUMN SET COMPRESSION */ + case AT_SetCompression: /* ALTER COLUMN SET COMPRESSION */ ATSimplePermissions(rel, ATT_TABLE | ATT_MATVIEW); /* This command never recurses */ /* No command-specific prep needed */ @@ -5666,11 +5666,11 @@ ATRewriteTable(AlteredTableInfo *tab, Oid OIDNewHeap, LOCKMODE lockmode) if (newrel) ereport(DEBUG1, (errmsg_internal("rewriting table \"%s\"", - RelationGetRelationName(oldrel)))); + RelationGetRelationName(oldrel)))); else ereport(DEBUG1, (errmsg_internal("verifying table \"%s\"", - RelationGetRelationName(oldrel)))); + RelationGetRelationName(oldrel)))); if (newrel) { @@ -7297,7 +7297,7 @@ NotNullImpliedByRelConstraints(Relation rel, Form_pg_attribute attr) { ereport(DEBUG1, (errmsg_internal("existing constraints on column \"%s.%s\" are sufficient to prove that it does not contain nulls", - RelationGetRelationName(rel), NameStr(attr->attname)))); + RelationGetRelationName(rel), NameStr(attr->attname)))); return true; } @@ -12876,7 +12876,7 @@ ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid refRelId, char *cmd, } else if (IsA(stm, CreateStatsStmt)) { - CreateStatsStmt *stmt = (CreateStatsStmt *) stm; + CreateStatsStmt *stmt = (CreateStatsStmt *) stm; AlterTableCmd *newcmd; /* keep the statistics object's comment */ @@ -14539,9 +14539,9 @@ MergeAttributesIntoExisting(Relation child_rel, Relation parent_rel) if (strcmp(child_expr, parent_expr) != 0) ereport(ERROR, - (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("column \"%s\" in child table has a conflicting generation expression", - attributeName))); + (errcode(ERRCODE_DATATYPE_MISMATCH), + errmsg("column \"%s\" in child table has a conflicting generation expression", + attributeName))); } /* @@ -14769,7 +14769,7 @@ static void MarkInheritDetached(Relation child_rel, Relation parent_rel) { Relation catalogRelation; - SysScanDesc scan; + SysScanDesc scan; ScanKeyData key; HeapTuple inheritsTuple; bool found = false; @@ -15645,7 +15645,7 @@ ATExecSetCompression(AlteredTableInfo *tab, if (!IsStorageCompressible(typstorage)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("column data type %s does not support compression", + errmsg("column data type %s does not support compression", format_type_be(atttableform->atttypid)))); /* get the attribute compression method. */ @@ -17010,11 +17010,11 @@ QueuePartitionConstraintValidation(List **wqueue, Relation scanrel, if (!validate_default) ereport(DEBUG1, (errmsg_internal("partition constraint for table \"%s\" is implied by existing constraints", - RelationGetRelationName(scanrel)))); + RelationGetRelationName(scanrel)))); else ereport(DEBUG1, (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints", - RelationGetRelationName(scanrel)))); + RelationGetRelationName(scanrel)))); return; } @@ -17745,8 +17745,8 @@ ATExecDetachPartition(List **wqueue, AlteredTableInfo *tab, Relation rel, AccessExclusiveLock); /* - * Check inheritance conditions and either delete the pg_inherits row - * (in non-concurrent mode) or just set the inhdetachpending flag. + * Check inheritance conditions and either delete the pg_inherits row (in + * non-concurrent mode) or just set the inhdetachpending flag. */ if (!concurrent) RemoveInheritance(partRel, rel, false); @@ -17771,11 +17771,11 @@ ATExecDetachPartition(List **wqueue, AlteredTableInfo *tab, Relation rel, */ if (concurrent) { - Oid partrelid, - parentrelid; + Oid partrelid, + parentrelid; LOCKTAG tag; - char *parentrelname; - char *partrelname; + char *parentrelname; + char *partrelname; /* * Add a new constraint to the partition being detached, which @@ -17815,10 +17815,10 @@ ATExecDetachPartition(List **wqueue, AlteredTableInfo *tab, Relation rel, StartTransactionCommand(); /* - * Now wait. This ensures that all queries that were planned including - * the partition are finished before we remove the rest of catalog - * entries. We don't need or indeed want to acquire this lock, though - * -- that would block later queries. + * Now wait. This ensures that all queries that were planned + * including the partition are finished before we remove the rest of + * catalog entries. We don't need or indeed want to acquire this + * lock, though -- that would block later queries. * * We don't need to concern ourselves with waiting for a lock on the * partition itself, since we will acquire AccessExclusiveLock below. @@ -18046,7 +18046,7 @@ DetachPartitionFinalize(Relation rel, Relation partRel, bool concurrent, static ObjectAddress ATExecDetachPartitionFinalize(Relation rel, RangeVar *name) { - Relation partRel; + Relation partRel; ObjectAddress address; Snapshot snap = GetActiveSnapshot(); diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index f305f8bc0f..ef34421f1c 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -4353,7 +4353,7 @@ GetAfterTriggersStoreSlot(AfterTriggersTableData *table, /* Create it if not already done. */ if (!table->storeslot) { - MemoryContext oldcxt; + MemoryContext oldcxt; /* * We only need this slot only until AfterTriggerEndQuery, but making diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 036fa69d17..58ec65c6af 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -1569,7 +1569,7 @@ DefineRange(CreateRangeStmt *stmt) /* Create the multirange that goes with it */ if (multirangeTypeName) { - Oid old_typoid; + Oid old_typoid; /* * Look to see if multirange type already exists. @@ -1579,8 +1579,8 @@ DefineRange(CreateRangeStmt *stmt) ObjectIdGetDatum(multirangeNamespace)); /* - * If it's not a shell, see if it's an autogenerated array type, and if so - * rename it out of the way. + * If it's not a shell, see if it's an autogenerated array type, and + * if so rename it out of the way. */ if (OidIsValid(old_typoid) && get_typisdefined(old_typoid)) { @@ -1600,7 +1600,7 @@ DefineRange(CreateRangeStmt *stmt) mltrngaddress = TypeCreate(multirangeOid, /* force assignment of this type OID */ multirangeTypeName, /* type name */ - multirangeNamespace, /* namespace */ + multirangeNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ @@ -1682,7 +1682,7 @@ DefineRange(CreateRangeStmt *stmt) TypeCreate(multirangeArrayOid, /* force assignment of this type OID */ multirangeArrayName, /* type name */ - multirangeNamespace, /* namespace */ + multirangeNamespace, /* namespace */ InvalidOid, /* relation oid (n/a here) */ 0, /* relation kind (ditto) */ GetUserId(), /* owner's ID */ @@ -1844,7 +1844,7 @@ makeMultirangeConstructors(const char *name, Oid namespace, PROKIND_FUNCTION, false, /* security_definer */ false, /* leakproof */ - true, /* isStrict */ + true, /* isStrict */ PROVOLATILE_IMMUTABLE, /* volatility */ PROPARALLEL_SAFE, /* parallel safety */ argtypes, /* parameterTypes */ @@ -1929,7 +1929,7 @@ makeMultirangeConstructors(const char *name, Oid namespace, PROKIND_FUNCTION, false, /* security_definer */ false, /* leakproof */ - true, /* isStrict */ + true, /* isStrict */ PROVOLATILE_IMMUTABLE, /* volatility */ PROPARALLEL_SAFE, /* parallel safety */ argtypes, /* parameterTypes */ diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 39df05c735..d549d0d86f 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -1173,8 +1173,8 @@ vacuum_xid_failsafe_check(TransactionId relfrozenxid, MultiXactId relminmxid) /* * Similar to above, determine the index skipping age to use for - * multixact. In any case no less than autovacuum_multixact_freeze_max_age - * * 1.05. + * multixact. In any case no less than autovacuum_multixact_freeze_max_age * + * 1.05. */ skip_index_vacuum = Max(vacuum_multixact_failsafe_age, autovacuum_multixact_freeze_max_age * 1.05); diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index b3726a54f3..10f0b349b5 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -427,6 +427,7 @@ ExecSupportsMarkRestore(Path *pathnode) { case T_IndexScan: case T_IndexOnlyScan: + /* * Not all index types support mark/restore. */ diff --git a/src/backend/executor/execAsync.c b/src/backend/executor/execAsync.c index 75108d36be..94a284a31e 100644 --- a/src/backend/executor/execAsync.c +++ b/src/backend/executor/execAsync.c @@ -26,7 +26,7 @@ void ExecAsyncRequest(AsyncRequest *areq) { if (areq->requestee->chgParam != NULL) /* something changed? */ - ExecReScan(areq->requestee); /* let ReScan handle this */ + ExecReScan(areq->requestee); /* let ReScan handle this */ /* must provide our own instrumentation support */ if (areq->requestee->instrument) @@ -124,7 +124,7 @@ ExecAsyncResponse(AsyncRequest *areq) default: /* If the node doesn't support async, caller messed up. */ elog(ERROR, "unrecognized node type: %d", - (int) nodeTag(areq->requestor)); + (int) nodeTag(areq->requestor)); } } diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 58b4968735..b3ce4bae53 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -132,8 +132,8 @@ ExecutorStart(QueryDesc *queryDesc, int eflags) /* * In some cases (e.g. an EXECUTE statement) a query execution will skip * parse analysis, which means that the query_id won't be reported. Note - * that it's harmless to report the query_id multiple time, as the call will - * be ignored if the top level query_id has already been reported. + * that it's harmless to report the query_id multiple time, as the call + * will be ignored if the top level query_id has already been reported. */ pgstat_report_query_id(queryDesc->plannedstmt->queryId, false); diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index 8e2feafd28..606c920b06 100644 --- a/src/backend/executor/execPartition.c +++ b/src/backend/executor/execPartition.c @@ -917,8 +917,8 @@ ExecInitRoutingInfo(ModifyTableState *mtstate, partRelInfo->ri_FdwRoutine->BeginForeignInsert(mtstate, partRelInfo); /* - * Determine if the FDW supports batch insert and determine the batch - * size (a FDW may support batching, but it may be disabled for the + * Determine if the FDW supports batch insert and determine the batch size + * (a FDW may support batching, but it may be disabled for the * server/table or for this particular query). * * If the FDW does not support batching, we set the batch size to 1. diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index d80adc519d..8440a76fbd 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -349,7 +349,7 @@ typedef struct HashAggSpill int64 *ntuples; /* number of tuples in each partition */ uint32 mask; /* mask to find partition from hash value */ int shift; /* after masking, shift by this amount */ - hyperLogLogState *hll_card; /* cardinality estimate for contents */ + hyperLogLogState *hll_card; /* cardinality estimate for contents */ } HashAggSpill; /* @@ -374,9 +374,9 @@ typedef struct HashAggBatch /* used to find referenced colnos */ typedef struct FindColsContext { - bool is_aggref; /* is under an aggref */ - Bitmapset *aggregated; /* column references under an aggref */ - Bitmapset *unaggregated; /* other column references */ + bool is_aggref; /* is under an aggref */ + Bitmapset *aggregated; /* column references under an aggref */ + Bitmapset *unaggregated; /* other column references */ } FindColsContext; static void select_current_set(AggState *aggstate, int setno, bool is_hash); @@ -1397,7 +1397,7 @@ project_aggregates(AggState *aggstate) static void find_cols(AggState *aggstate, Bitmapset **aggregated, Bitmapset **unaggregated) { - Agg *agg = (Agg *) aggstate->ss.ps.plan; + Agg *agg = (Agg *) aggstate->ss.ps.plan; FindColsContext context; context.is_aggref = false; @@ -1579,7 +1579,8 @@ find_hash_columns(AggState *aggstate) for (int i = 0; i < scanDesc->natts; i++) { - int colno = i + 1; + int colno = i + 1; + if (bms_is_member(colno, aggstate->colnos_needed)) aggstate->max_colno_needed = colno; else @@ -3158,10 +3159,10 @@ hashagg_spill_finish(AggState *aggstate, HashAggSpill *spill, int setno) for (i = 0; i < spill->npartitions; i++) { - LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; - int tapenum = spill->partitions[i]; - HashAggBatch *new_batch; - double cardinality; + LogicalTapeSet *tapeset = aggstate->hash_tapeinfo->tapeset; + int tapenum = spill->partitions[i]; + HashAggBatch *new_batch; + double cardinality; /* if the partition is empty, don't create a new batch of work */ if (spill->ntuples[i] == 0) diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index 1558fafad1..62335ed4c4 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -566,9 +566,9 @@ choose_next_subplan_locally(AppendState *node) /* * If first call then have the bms member function choose the first valid - * sync subplan by initializing whichplan to -1. If there happen to be - * no valid sync subplans then the bms member function will handle that - * by returning a negative number which will allow us to exit returning a + * sync subplan by initializing whichplan to -1. If there happen to be no + * valid sync subplans then the bms member function will handle that by + * returning a negative number which will allow us to exit returning a * false value. */ if (whichplan == INVALID_SUBPLAN_INDEX) @@ -925,8 +925,8 @@ ExecAppendAsyncGetNext(AppendState *node, TupleTableSlot **result) /* * If all sync subplans are complete, we're totally done scanning the - * given node. Otherwise, we're done with the asynchronous stuff but - * must continue scanning the sync subplans. + * given node. Otherwise, we're done with the asynchronous stuff but must + * continue scanning the sync subplans. */ if (node->as_syncdone) { @@ -1003,7 +1003,7 @@ ExecAppendAsyncEventWait(AppendState *node) { int nevents = node->as_nasyncplans + 1; long timeout = node->as_syncdone ? -1 : 0; - WaitEvent occurred_event[EVENT_BUFFER_SIZE]; + WaitEvent occurred_event[EVENT_BUFFER_SIZE]; int noccurred; int i; @@ -1054,8 +1054,8 @@ ExecAppendAsyncEventWait(AppendState *node) /* * Mark it as no longer needing a callback. We must do this - * before dispatching the callback in case the callback resets - * the flag. + * before dispatching the callback in case the callback resets the + * flag. */ Assert(areq->callback_pending); areq->callback_pending = false; diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c index 9e1dc464cb..734142b7b1 100644 --- a/src/backend/executor/nodeGather.c +++ b/src/backend/executor/nodeGather.c @@ -266,7 +266,7 @@ gather_getnext(GatherState *gatherstate) PlanState *outerPlan = outerPlanState(gatherstate); TupleTableSlot *outerTupleSlot; TupleTableSlot *fslot = gatherstate->funnel_slot; - MinimalTuple tup; + MinimalTuple tup; while (gatherstate->nreaders > 0 || gatherstate->need_to_scan_locally) { @@ -278,7 +278,7 @@ gather_getnext(GatherState *gatherstate) if (HeapTupleIsValid(tup)) { - ExecStoreMinimalTuple(tup, /* tuple to store */ + ExecStoreMinimalTuple(tup, /* tuple to store */ fslot, /* slot to store the tuple */ false); /* don't pfree tuple */ return fslot; diff --git a/src/backend/executor/nodeGatherMerge.c b/src/backend/executor/nodeGatherMerge.c index aa5743cebf..03f02a19aa 100644 --- a/src/backend/executor/nodeGatherMerge.c +++ b/src/backend/executor/nodeGatherMerge.c @@ -700,9 +700,9 @@ gather_merge_readnext(GatherMergeState *gm_state, int reader, bool nowait) Assert(tup); /* Build the TupleTableSlot for the given tuple */ - ExecStoreMinimalTuple(tup, /* tuple to store */ - gm_state->gm_slots[reader], /* slot in which to store - * the tuple */ + ExecStoreMinimalTuple(tup, /* tuple to store */ + gm_state->gm_slots[reader], /* slot in which to + * store the tuple */ true); /* pfree tuple when done with it */ return true; diff --git a/src/backend/executor/nodeIncrementalSort.c b/src/backend/executor/nodeIncrementalSort.c index 18f246a823..934426a667 100644 --- a/src/backend/executor/nodeIncrementalSort.c +++ b/src/backend/executor/nodeIncrementalSort.c @@ -1162,8 +1162,8 @@ ExecReScanIncrementalSort(IncrementalSortState *node) } /* - * If chgParam of subnode is not null, then the plan will be re-scanned - * by the first ExecProcNode. + * If chgParam of subnode is not null, then the plan will be re-scanned by + * the first ExecProcNode. */ if (outerPlan->chgParam == NULL) ExecReScan(outerPlan); diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index a62928ae7c..0816027f7f 100644 --- a/src/backend/executor/nodeModifyTable.c +++ b/src/backend/executor/nodeModifyTable.c @@ -61,12 +61,12 @@ typedef struct MTTargetRelLookup } MTTargetRelLookup; static void ExecBatchInsert(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int numSlots, - EState *estate, - bool canSetTag); + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int numSlots, + EState *estate, + bool canSetTag); static bool ExecOnConflictUpdate(ModifyTableState *mtstate, ResultRelInfo *resultRelInfo, ItemPointer conflictTid, @@ -673,17 +673,17 @@ ExecInsert(ModifyTableState *mtstate, if (resultRelInfo->ri_BatchSize > 1) { /* - * If a certain number of tuples have already been accumulated, - * or a tuple has come for a different relation than that for - * the accumulated tuples, perform the batch insert + * If a certain number of tuples have already been accumulated, or + * a tuple has come for a different relation than that for the + * accumulated tuples, perform the batch insert */ if (resultRelInfo->ri_NumSlots == resultRelInfo->ri_BatchSize) { ExecBatchInsert(mtstate, resultRelInfo, - resultRelInfo->ri_Slots, - resultRelInfo->ri_PlanSlots, - resultRelInfo->ri_NumSlots, - estate, canSetTag); + resultRelInfo->ri_Slots, + resultRelInfo->ri_PlanSlots, + resultRelInfo->ri_NumSlots, + estate, canSetTag); resultRelInfo->ri_NumSlots = 0; } @@ -692,9 +692,9 @@ ExecInsert(ModifyTableState *mtstate, if (resultRelInfo->ri_Slots == NULL) { resultRelInfo->ri_Slots = palloc(sizeof(TupleTableSlot *) * - resultRelInfo->ri_BatchSize); + resultRelInfo->ri_BatchSize); resultRelInfo->ri_PlanSlots = palloc(sizeof(TupleTableSlot *) * - resultRelInfo->ri_BatchSize); + resultRelInfo->ri_BatchSize); } resultRelInfo->ri_Slots[resultRelInfo->ri_NumSlots] = @@ -982,12 +982,12 @@ ExecInsert(ModifyTableState *mtstate, */ static void ExecBatchInsert(ModifyTableState *mtstate, - ResultRelInfo *resultRelInfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int numSlots, - EState *estate, - bool canSetTag) + ResultRelInfo *resultRelInfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int numSlots, + EState *estate, + bool canSetTag) { int i; int numInserted = numSlots; @@ -998,10 +998,10 @@ ExecBatchInsert(ModifyTableState *mtstate, * insert into foreign table: let the FDW do it */ rslots = resultRelInfo->ri_FdwRoutine->ExecForeignBatchInsert(estate, - resultRelInfo, - slots, - planSlots, - &numInserted); + resultRelInfo, + slots, + planSlots, + &numInserted); for (i = 0; i < numInserted; i++) { @@ -2604,10 +2604,10 @@ ExecModifyTable(PlanState *pstate) resultRelInfo = lfirst(lc); if (resultRelInfo->ri_NumSlots > 0) ExecBatchInsert(node, resultRelInfo, - resultRelInfo->ri_Slots, - resultRelInfo->ri_PlanSlots, - resultRelInfo->ri_NumSlots, - estate, node->canSetTag); + resultRelInfo->ri_Slots, + resultRelInfo->ri_PlanSlots, + resultRelInfo->ri_NumSlots, + estate, node->canSetTag); } /* @@ -3091,12 +3091,12 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags) mtstate->mt_resultOidHash = NULL; /* - * Determine if the FDW supports batch insert and determine the batch - * size (a FDW may support batching, but it may be disabled for the + * Determine if the FDW supports batch insert and determine the batch size + * (a FDW may support batching, but it may be disabled for the * server/table). * - * We only do this for INSERT, so that for UPDATE/DELETE the batch - * size remains set to 0. + * We only do this for INSERT, so that for UPDATE/DELETE the batch size + * remains set to 0. */ if (operation == CMD_INSERT) { diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c index 98a27f08bf..71029a39a9 100644 --- a/src/backend/jit/llvm/llvmjit.c +++ b/src/backend/jit/llvm/llvmjit.c @@ -769,9 +769,9 @@ llvm_compile_module(LLVMJitContext *context) ereport(DEBUG1, (errmsg_internal("time to inline: %.3fs, opt: %.3fs, emit: %.3fs", - INSTR_TIME_GET_DOUBLE(context->base.instr.inlining_counter), - INSTR_TIME_GET_DOUBLE(context->base.instr.optimization_counter), - INSTR_TIME_GET_DOUBLE(context->base.instr.emission_counter)), + INSTR_TIME_GET_DOUBLE(context->base.instr.inlining_counter), + INSTR_TIME_GET_DOUBLE(context->base.instr.optimization_counter), + INSTR_TIME_GET_DOUBLE(context->base.instr.emission_counter)), errhidestmt(true), errhidecontext(true))); } @@ -1094,7 +1094,7 @@ llvm_resolve_symbol(const char *symname, void *ctx) static LLVMErrorRef llvm_resolve_symbols(LLVMOrcDefinitionGeneratorRef GeneratorObj, void *Ctx, - LLVMOrcLookupStateRef *LookupState, LLVMOrcLookupKind Kind, + LLVMOrcLookupStateRef * LookupState, LLVMOrcLookupKind Kind, LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags JDLookupFlags, LLVMOrcCLookupSet LookupSet, size_t LookupSetSize) { diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 45a91235a4..68372fcea8 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -711,17 +711,16 @@ recv_password_packet(Port *port) if (mtype != 'p') { /* - * If the client just disconnects without offering a password, - * don't make a log entry. This is legal per protocol spec and in - * fact commonly done by psql, so complaining just clutters the - * log. + * If the client just disconnects without offering a password, don't + * make a log entry. This is legal per protocol spec and in fact + * commonly done by psql, so complaining just clutters the log. */ if (mtype != EOF) ereport(ERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), errmsg("expected password response, got message type %d", mtype))); - return NULL; /* EOF or bad message type */ + return NULL; /* EOF or bad message type */ } initStringInfo(&buf); diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 40deab13c7..c4e8113241 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -602,6 +602,7 @@ aloop: port->peer_cn = NULL; return -1; } + /* * RFC2253 is the closest thing to an accepted standard format for * DNs. We have documented how to produce this format from a diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index b9ccd4473f..89a5f901aa 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -175,8 +175,8 @@ WaitEventSet *FeBeWaitSet; void pq_init(void) { - int socket_pos PG_USED_FOR_ASSERTS_ONLY; - int latch_pos PG_USED_FOR_ASSERTS_ONLY; + int socket_pos PG_USED_FOR_ASSERTS_ONLY; + int latch_pos PG_USED_FOR_ASSERTS_ONLY; /* initialize state variables */ PqSendBufferSize = PQ_SEND_BUFFER_SIZE; diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 7003238d76..b02f7809c9 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -1907,11 +1907,11 @@ create_gather_merge_plan(PlannerInfo *root, GatherMergePath *best_path) /* - * All gather merge paths should have already guaranteed the necessary sort - * order either by adding an explicit sort node or by using presorted input. - * We can't simply add a sort here on additional pathkeys, because we can't - * guarantee the sort would be safe. For example, expressions may be - * volatile or otherwise parallel unsafe. + * All gather merge paths should have already guaranteed the necessary + * sort order either by adding an explicit sort node or by using presorted + * input. We can't simply add a sort here on additional pathkeys, because + * we can't guarantee the sort would be safe. For example, expressions may + * be volatile or otherwise parallel unsafe. */ if (!pathkeys_contained_in(pathkeys, best_path->subpath->pathkeys)) elog(ERROR, "gather merge input not sufficiently sorted"); diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index aefb6f8d4e..e9434580d6 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -350,34 +350,34 @@ expand_insert_targetlist(List *tlist, Relation rel) Oid attcollation = att_tup->attcollation; Node *new_expr; - if (!att_tup->attisdropped) - { - new_expr = (Node *) makeConst(atttype, - -1, - attcollation, - att_tup->attlen, - (Datum) 0, - true, /* isnull */ - att_tup->attbyval); - new_expr = coerce_to_domain(new_expr, - InvalidOid, -1, - atttype, - COERCION_IMPLICIT, - COERCE_IMPLICIT_CAST, - -1, - false); - } - else - { - /* Insert NULL for dropped column */ - new_expr = (Node *) makeConst(INT4OID, - -1, - InvalidOid, - sizeof(int32), - (Datum) 0, - true, /* isnull */ - true /* byval */ ); - } + if (!att_tup->attisdropped) + { + new_expr = (Node *) makeConst(atttype, + -1, + attcollation, + att_tup->attlen, + (Datum) 0, + true, /* isnull */ + att_tup->attbyval); + new_expr = coerce_to_domain(new_expr, + InvalidOid, -1, + atttype, + COERCION_IMPLICIT, + COERCE_IMPLICIT_CAST, + -1, + false); + } + else + { + /* Insert NULL for dropped column */ + new_expr = (Node *) makeConst(INT4OID, + -1, + InvalidOid, + sizeof(int32), + (Datum) 0, + true, /* isnull */ + true /* byval */ ); + } new_tle = makeTargetEntry((Expr *) new_expr, attrno, diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index d9ad4efc5e..e117ab976e 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -2563,9 +2563,9 @@ eval_const_expressions_mutator(Node *node, } case T_NullIfExpr: { - NullIfExpr *expr; - ListCell *arg; - bool has_nonconst_input = false; + NullIfExpr *expr; + ListCell *arg; + bool has_nonconst_input = false; /* Copy the node and const-simplify its arguments */ expr = (NullIfExpr *) ece_generic_processing(node); @@ -4359,49 +4359,49 @@ inline_function(Oid funcid, Oid result_type, Oid result_collid, } else { - /* - * Set up to handle parameters while parsing the function body. We need a - * dummy FuncExpr node containing the already-simplified arguments to pass - * to prepare_sql_fn_parse_info. (In some cases we don't really need - * that, but for simplicity we always build it.) - */ - fexpr = makeNode(FuncExpr); - fexpr->funcid = funcid; - fexpr->funcresulttype = result_type; - fexpr->funcretset = false; - fexpr->funcvariadic = funcvariadic; - fexpr->funcformat = COERCE_EXPLICIT_CALL; /* doesn't matter */ - fexpr->funccollid = result_collid; /* doesn't matter */ - fexpr->inputcollid = input_collid; - fexpr->args = args; - fexpr->location = -1; + /* + * Set up to handle parameters while parsing the function body. We + * need a dummy FuncExpr node containing the already-simplified + * arguments to pass to prepare_sql_fn_parse_info. (In some cases we + * don't really need that, but for simplicity we always build it.) + */ + fexpr = makeNode(FuncExpr); + fexpr->funcid = funcid; + fexpr->funcresulttype = result_type; + fexpr->funcretset = false; + fexpr->funcvariadic = funcvariadic; + fexpr->funcformat = COERCE_EXPLICIT_CALL; /* doesn't matter */ + fexpr->funccollid = result_collid; /* doesn't matter */ + fexpr->inputcollid = input_collid; + fexpr->args = args; + fexpr->location = -1; - pinfo = prepare_sql_fn_parse_info(func_tuple, - (Node *) fexpr, - input_collid); + pinfo = prepare_sql_fn_parse_info(func_tuple, + (Node *) fexpr, + input_collid); - /* fexpr also provides a convenient way to resolve a composite result */ - (void) get_expr_result_type((Node *) fexpr, - NULL, - &rettupdesc); + /* fexpr also provides a convenient way to resolve a composite result */ + (void) get_expr_result_type((Node *) fexpr, + NULL, + &rettupdesc); - /* - * We just do parsing and parse analysis, not rewriting, because rewriting - * will not affect table-free-SELECT-only queries, which is all that we - * care about. Also, we can punt as soon as we detect more than one - * command in the function body. - */ - raw_parsetree_list = pg_parse_query(src); - if (list_length(raw_parsetree_list) != 1) - goto fail; + /* + * We just do parsing and parse analysis, not rewriting, because + * rewriting will not affect table-free-SELECT-only queries, which is + * all that we care about. Also, we can punt as soon as we detect + * more than one command in the function body. + */ + raw_parsetree_list = pg_parse_query(src); + if (list_length(raw_parsetree_list) != 1) + goto fail; - pstate = make_parsestate(NULL); - pstate->p_sourcetext = src; - sql_fn_parser_setup(pstate, pinfo); + pstate = make_parsestate(NULL); + pstate->p_sourcetext = src; + sql_fn_parser_setup(pstate, pinfo); - querytree = transformTopLevelStmt(pstate, linitial(raw_parsetree_list)); + querytree = transformTopLevelStmt(pstate, linitial(raw_parsetree_list)); - free_parsestate(pstate); + free_parsestate(pstate); } /* @@ -4931,31 +4931,31 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte) } else { - /* - * Set up to handle parameters while parsing the function body. We can - * use the FuncExpr just created as the input for - * prepare_sql_fn_parse_info. - */ - pinfo = prepare_sql_fn_parse_info(func_tuple, - (Node *) fexpr, - fexpr->inputcollid); + /* + * Set up to handle parameters while parsing the function body. We + * can use the FuncExpr just created as the input for + * prepare_sql_fn_parse_info. + */ + pinfo = prepare_sql_fn_parse_info(func_tuple, + (Node *) fexpr, + fexpr->inputcollid); - /* - * Parse, analyze, and rewrite (unlike inline_function(), we can't skip - * rewriting here). We can fail as soon as we find more than one query, - * though. - */ - raw_parsetree_list = pg_parse_query(src); - if (list_length(raw_parsetree_list) != 1) - goto fail; + /* + * Parse, analyze, and rewrite (unlike inline_function(), we can't + * skip rewriting here). We can fail as soon as we find more than one + * query, though. + */ + raw_parsetree_list = pg_parse_query(src); + if (list_length(raw_parsetree_list) != 1) + goto fail; - querytree_list = pg_analyze_and_rewrite_params(linitial(raw_parsetree_list), - src, - (ParserSetupHook) sql_fn_parser_setup, - pinfo, NULL); - if (list_length(querytree_list) != 1) - goto fail; - querytree = linitial(querytree_list); + querytree_list = pg_analyze_and_rewrite_params(linitial(raw_parsetree_list), + src, + (ParserSetupHook) sql_fn_parser_setup, + pinfo, NULL); + if (list_length(querytree_list) != 1) + goto fail; + querytree = linitial(querytree_list); } /* diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index e415bc3df0..168198acd1 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -2752,7 +2752,7 @@ transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt) (stmt->options & CURSOR_OPT_NO_SCROLL)) ereport(ERROR, (errcode(ERRCODE_INVALID_CURSOR_DEFINITION), - /* translator: %s is a SQL keyword */ + /* translator: %s is a SQL keyword */ errmsg("cannot specify both %s and %s", "SCROLL", "NO SCROLL"))); @@ -2760,7 +2760,7 @@ transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt) (stmt->options & CURSOR_OPT_INSENSITIVE)) ereport(ERROR, (errcode(ERRCODE_INVALID_CURSOR_DEFINITION), - /* translator: %s is a SQL keyword */ + /* translator: %s is a SQL keyword */ errmsg("cannot specify both %s and %s", "ASENSITIVE", "INSENSITIVE"))); diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index ceb0bf597d..9562ffcf3e 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -1749,19 +1749,20 @@ cmp_list_len_asc(const ListCell *a, const ListCell *b) static int cmp_list_len_contents_asc(const ListCell *a, const ListCell *b) { - int res = cmp_list_len_asc(a, b); + int res = cmp_list_len_asc(a, b); if (res == 0) { - List *la = (List *) lfirst(a); - List *lb = (List *) lfirst(b); - ListCell *lca; - ListCell *lcb; + List *la = (List *) lfirst(a); + List *lb = (List *) lfirst(b); + ListCell *lca; + ListCell *lcb; forboth(lca, la, lcb, lb) { - int va = lfirst_int(lca); - int vb = lfirst_int(lcb); + int va = lfirst_int(lca); + int vb = lfirst_int(lcb); + if (va > vb) return 1; if (va < vb) diff --git a/src/backend/parser/parse_cte.c b/src/backend/parser/parse_cte.c index ee7613187a..f6ae96333a 100644 --- a/src/backend/parser/parse_cte.c +++ b/src/backend/parser/parse_cte.c @@ -356,7 +356,7 @@ analyzeCTE(ParseState *pstate, CommonTableExpr *cte) * than just being recursive. It basically means the query expression * looks like * - * non-recursive query UNION [ALL] recursive query + * non-recursive query UNION [ALL] recursive query * * and that the recursive query is not itself a set operation. * diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index d451f055f7..7465919044 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -2360,8 +2360,8 @@ addRangeTableEntryForCTE(ParseState *pstate, * list --- caller must do that if appropriate. */ psi = buildNSItemFromLists(rte, list_length(pstate->p_rtable), - rte->coltypes, rte->coltypmods, - rte->colcollations); + rte->coltypes, rte->coltypmods, + rte->colcollations); /* * The columns added by search and cycle clauses are not included in star diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 48cce4567b..d5b67d48cf 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -447,8 +447,8 @@ generateSerialExtraStmts(CreateStmtContext *cxt, ColumnDef *column, ereport(DEBUG1, (errmsg_internal("%s will create implicit sequence \"%s\" for serial column \"%s.%s\"", - cxt->stmtType, sname, - cxt->relation->relname, column->colname))); + cxt->stmtType, sname, + cxt->relation->relname, column->colname))); /* * Build a CREATE SEQUENCE command to create the sequence object, and add diff --git a/src/backend/partitioning/partbounds.c b/src/backend/partitioning/partbounds.c index d3dedfd784..7925fcce3b 100644 --- a/src/backend/partitioning/partbounds.c +++ b/src/backend/partitioning/partbounds.c @@ -2876,7 +2876,10 @@ check_new_partition_bound(char *relname, Relation parent, { int prev_modulus; - /* We found the largest modulus less than or equal to ours. */ + /* + * We found the largest modulus less than or equal to + * ours. + */ prev_modulus = DatumGetInt32(boundinfo->datums[offset][0]); if (spec->modulus % prev_modulus != 0) @@ -3171,7 +3174,7 @@ check_default_partition_contents(Relation parent, Relation default_rel, { ereport(DEBUG1, (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints", - RelationGetRelationName(default_rel)))); + RelationGetRelationName(default_rel)))); return; } @@ -3222,7 +3225,7 @@ check_default_partition_contents(Relation parent, Relation default_rel, { ereport(DEBUG1, (errmsg_internal("updated partition constraint for default partition \"%s\" is implied by existing constraints", - RelationGetRelationName(part_rel)))); + RelationGetRelationName(part_rel)))); table_close(part_rel, NoLock); continue; diff --git a/src/backend/partitioning/partdesc.c b/src/backend/partitioning/partdesc.c index cf1ca0fe5f..9a9d6a9643 100644 --- a/src/backend/partitioning/partdesc.c +++ b/src/backend/partitioning/partdesc.c @@ -336,8 +336,8 @@ RelationBuildPartitionDesc(Relation rel, bool omit_detached) * descriptor, it contains an old partition descriptor that may still be * referenced somewhere. Preserve it, while not leaking it, by * reattaching it as a child context of the new one. Eventually it will - * get dropped by either RelationClose or RelationClearRelation. - * (We keep the regular partdesc in rd_pdcxt, and the partdesc-excluding- + * get dropped by either RelationClose or RelationClearRelation. (We keep + * the regular partdesc in rd_pdcxt, and the partdesc-excluding- * detached-partitions in rd_pddcxt.) */ if (is_omit) diff --git a/src/backend/port/win32_shmem.c b/src/backend/port/win32_shmem.c index 6140ee7617..d7a71992d8 100644 --- a/src/backend/port/win32_shmem.c +++ b/src/backend/port/win32_shmem.c @@ -142,7 +142,11 @@ EnableLockPagesPrivilege(int elevel) { ereport(elevel, (errmsg("could not enable user right \"%s\": error code %lu", - /* translator: This is a term from Windows and should be translated to match the Windows localization. */ + + /* + * translator: This is a term from Windows and should be translated to + * match the Windows localization. + */ _("Lock pages in memory"), GetLastError()), errdetail("Failed system call was %s.", "OpenProcessToken"))); diff --git a/src/backend/postmaster/bgworker.c b/src/backend/postmaster/bgworker.c index 11fc1b7863..2d2c450ba3 100644 --- a/src/backend/postmaster/bgworker.c +++ b/src/backend/postmaster/bgworker.c @@ -403,7 +403,7 @@ BackgroundWorkerStateChange(bool allow_new_workers) /* Log it! */ ereport(DEBUG1, (errmsg_internal("registering background worker \"%s\"", - rw->rw_worker.bgw_name))); + rw->rw_worker.bgw_name))); slist_push_head(&BackgroundWorkerList, &rw->rw_lnode); } @@ -435,7 +435,7 @@ ForgetBackgroundWorker(slist_mutable_iter *cur) ereport(DEBUG1, (errmsg_internal("unregistering background worker \"%s\"", - rw->rw_worker.bgw_name))); + rw->rw_worker.bgw_name))); slist_delete_current(cur); free(rw); diff --git a/src/backend/postmaster/checkpointer.c b/src/backend/postmaster/checkpointer.c index e7e6a2a459..cdd07770a0 100644 --- a/src/backend/postmaster/checkpointer.c +++ b/src/backend/postmaster/checkpointer.c @@ -1238,7 +1238,7 @@ CompactCheckpointerRequestQueue(void) } ereport(DEBUG1, (errmsg_internal("compacted fsync request queue from %d entries to %d entries", - CheckpointerShmem->num_requests, preserve_count))); + CheckpointerShmem->num_requests, preserve_count))); CheckpointerShmem->num_requests = preserve_count; /* Cleanup. */ diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index e94f5f55c7..249b17c92b 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -3708,7 +3708,7 @@ pgstat_write_statsfiles(bool permanent, bool allDbs) { fputc('R', fpout); rc = fwrite(slotent, sizeof(PgStat_StatReplSlotEntry), 1, fpout); - (void) rc; /* we'll check for error with ferror */ + (void) rc; /* we'll check for error with ferror */ } } diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index b05db5a473..6833f0f7f2 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -660,6 +660,7 @@ PostmasterMain(int argc, char *argv[]) pqsignal_pm(SIGCHLD, reaper); /* handle child termination */ #ifdef SIGURG + /* * Ignore SIGURG for now. Child processes may change this (see * InitializeLatchSupport), but they will not receive any such signals @@ -5780,7 +5781,7 @@ do_start_bgworker(RegisteredBgWorker *rw) ereport(DEBUG1, (errmsg_internal("starting background worker process \"%s\"", - rw->rw_worker.bgw_name))); + rw->rw_worker.bgw_name))); #ifdef EXEC_BACKEND switch ((worker_pid = bgworker_forkexec(rw->rw_shmem_slot))) diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index e7a7486c35..cad43bdef2 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -239,7 +239,8 @@ SysLoggerMain(int argc, char *argv[]) * broken backends... */ - pqsignal(SIGHUP, SignalHandlerForConfigReload); /* set flag to read config file */ + pqsignal(SIGHUP, SignalHandlerForConfigReload); /* set flag to read config + * file */ pqsignal(SIGINT, SIG_IGN); pqsignal(SIGTERM, SIG_IGN); pqsignal(SIGQUIT, SIG_IGN); diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c index 767eac33e4..e09108d0ec 100644 --- a/src/backend/replication/basebackup.c +++ b/src/backend/replication/basebackup.c @@ -414,7 +414,7 @@ perform_base_backup(basebackup_options *opt) if (ti->path == NULL) { struct stat statbuf; - bool sendtblspclinks = true; + bool sendtblspclinks = true; /* In the main tar, include the backup_label first... */ sendFileWithContent(BACKUP_LABEL_FILE, labelfile->data, diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index cb462a052a..85f325c389 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -67,12 +67,6 @@ typedef struct LogicalRepCtxStruct LogicalRepCtxStruct *LogicalRepCtx; -typedef struct LogicalRepWorkerId -{ - Oid subid; - Oid relid; -} LogicalRepWorkerId; - static void ApplyLauncherWakeup(void); static void logicalrep_launcher_onexit(int code, Datum arg); static void logicalrep_worker_onexit(int code, Datum arg); @@ -283,7 +277,7 @@ logicalrep_worker_launch(Oid dbid, Oid subid, const char *subname, Oid userid, ereport(DEBUG1, (errmsg_internal("starting logical replication worker for subscription \"%s\"", - subname))); + subname))); /* Report this after the initial starting message for consistency. */ if (max_replication_slots == 0) diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c index 39471fddad..b955f43458 100644 --- a/src/backend/replication/logical/origin.c +++ b/src/backend/replication/logical/origin.c @@ -576,8 +576,8 @@ CheckPointReplicationOrigin(void) tmppath))); /* - * no other backend can perform this at the same time; only one - * checkpoint can happen at a time. + * no other backend can perform this at the same time; only one checkpoint + * can happen at a time. */ tmpfd = OpenTransientFile(tmppath, O_CREAT | O_EXCL | O_WRONLY | PG_BINARY); diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index e80a195472..b0ab91cc71 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -2493,11 +2493,11 @@ ReorderBufferProcessTXN(ReorderBuffer *rb, ReorderBufferTXN *txn, * need to do the cleanup and return gracefully on this error, see * SetupCheckXidLive. * - * This error code can be thrown by one of the callbacks we call during - * decoding so we need to ensure that we return gracefully only when we are - * sending the data in streaming mode and the streaming is not finished yet - * or when we are sending the data out on a PREPARE during a two-phase - * commit. + * This error code can be thrown by one of the callbacks we call + * during decoding so we need to ensure that we return gracefully only + * when we are sending the data in streaming mode and the streaming is + * not finished yet or when we are sending the data out on a PREPARE + * during a two-phase commit. */ if (errdata->sqlerrcode == ERRCODE_TRANSACTION_ROLLBACK && (stream_started || rbtxn_prepared(txn))) diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c index 9118e21422..04f3355f60 100644 --- a/src/backend/replication/logical/snapbuild.c +++ b/src/backend/replication/logical/snapbuild.c @@ -1395,8 +1395,8 @@ SnapBuildWaitSnapshot(xl_running_xacts *running, TransactionId cutoff) /* * All transactions we needed to finish finished - try to ensure there is * another xl_running_xacts record in a timely manner, without having to - * wait for bgwriter or checkpointer to log one. During recovery we - * can't enforce that, so we'll have to wait. + * wait for bgwriter or checkpointer to log one. During recovery we can't + * enforce that, so we'll have to wait. */ if (!RecoveryInProgress()) { diff --git a/src/backend/replication/slot.c b/src/backend/replication/slot.c index cf261e200e..c88b803e5d 100644 --- a/src/backend/replication/slot.c +++ b/src/backend/replication/slot.c @@ -99,8 +99,8 @@ ReplicationSlot *MyReplicationSlot = NULL; int max_replication_slots = 0; /* the maximum number of replication * slots */ -static int ReplicationSlotAcquireInternal(ReplicationSlot *slot, - const char *name, SlotAcquireBehavior behavior); +static int ReplicationSlotAcquireInternal(ReplicationSlot *slot, + const char *name, SlotAcquireBehavior behavior); static void ReplicationSlotDropAcquired(void); static void ReplicationSlotDropPtr(ReplicationSlot *slot); @@ -451,8 +451,8 @@ retry: /* * If we found the slot but it's already active in another process, we - * either error out, return the PID of the owning process, or retry - * after a short wait, as caller specified. + * either error out, return the PID of the owning process, or retry after + * a short wait, as caller specified. */ if (active_pid != MyProcPid) { @@ -471,7 +471,7 @@ retry: goto retry; } else if (behavior == SAB_Block) - ConditionVariableCancelSleep(); /* no sleep needed after all */ + ConditionVariableCancelSleep(); /* no sleep needed after all */ /* Let everybody know we've modified this slot */ ConditionVariableBroadcast(&s->active_cv); @@ -1180,8 +1180,8 @@ restart: ReplicationSlot *s = &ReplicationSlotCtl->replication_slots[i]; XLogRecPtr restart_lsn = InvalidXLogRecPtr; NameData slotname; - int wspid; - int last_signaled_pid = 0; + int wspid; + int last_signaled_pid = 0; if (!s->in_use) continue; @@ -1204,20 +1204,20 @@ restart: /* * Try to mark this slot as used by this process. * - * Note that ReplicationSlotAcquireInternal(SAB_Inquire) - * should not cancel the prepared condition variable - * if this slot is active in other process. Because in this case - * we have to wait on that CV for the process owning - * the slot to be terminated, later. + * Note that ReplicationSlotAcquireInternal(SAB_Inquire) should + * not cancel the prepared condition variable if this slot is + * active in other process. Because in this case we have to wait + * on that CV for the process owning the slot to be terminated, + * later. */ wspid = ReplicationSlotAcquireInternal(s, NULL, SAB_Inquire); /* - * Exit the loop if we successfully acquired the slot or - * the slot was dropped during waiting for the owning process - * to be terminated. For example, the latter case is likely to - * happen when the slot is temporary because it's automatically - * dropped by the termination of the owning process. + * Exit the loop if we successfully acquired the slot or the slot + * was dropped during waiting for the owning process to be + * terminated. For example, the latter case is likely to happen + * when the slot is temporary because it's automatically dropped + * by the termination of the owning process. */ if (wspid <= 0) break; @@ -1225,13 +1225,13 @@ restart: /* * Signal to terminate the process that owns the slot. * - * There is the race condition where other process may own - * the slot after the process using it was terminated and before - * this process owns it. To handle this case, we signal again - * if the PID of the owning process is changed than the last. + * There is the race condition where other process may own the + * slot after the process using it was terminated and before this + * process owns it. To handle this case, we signal again if the + * PID of the owning process is changed than the last. * - * XXX This logic assumes that the same PID is not reused - * very quickly. + * XXX This logic assumes that the same PID is not reused very + * quickly. */ if (last_signaled_pid != wspid) { @@ -1248,8 +1248,8 @@ restart: ConditionVariableCancelSleep(); /* - * Do nothing here and start from scratch if the slot has - * already been dropped. + * Do nothing here and start from scratch if the slot has already been + * dropped. */ if (wspid == -1) goto restart; diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c index d9d36879ed..e4e6632f82 100644 --- a/src/backend/replication/slotfuncs.c +++ b/src/backend/replication/slotfuncs.c @@ -415,11 +415,11 @@ pg_get_replication_slots(PG_FUNCTION_ARGS) nulls[i++] = true; else { - XLogSegNo targetSeg; - uint64 slotKeepSegs; - uint64 keepSegs; - XLogSegNo failSeg; - XLogRecPtr failLSN; + XLogSegNo targetSeg; + uint64 slotKeepSegs; + uint64 keepSegs; + XLogSegNo failSeg; + XLogRecPtr failLSN; XLByteToSeg(slot_contents.data.restart_lsn, targetSeg, wal_segment_size); diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 7fa1a87cd8..bdbc9ef844 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -165,12 +165,11 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit) * Since this routine gets called every commit time, it's important to * exit quickly if sync replication is not requested. So we check * WalSndCtl->sync_standbys_defined flag without the lock and exit - * immediately if it's false. If it's true, we need to check it again later - * while holding the lock, to check the flag and operate the sync rep - * queue atomically. This is necessary to avoid the race condition - * described in SyncRepUpdateSyncStandbysDefined(). On the other - * hand, if it's false, the lock is not necessary because we don't touch - * the queue. + * immediately if it's false. If it's true, we need to check it again + * later while holding the lock, to check the flag and operate the sync + * rep queue atomically. This is necessary to avoid the race condition + * described in SyncRepUpdateSyncStandbysDefined(). On the other hand, if + * it's false, the lock is not necessary because we don't touch the queue. */ if (!SyncRepRequested() || !((volatile WalSndCtlData *) WalSndCtl)->sync_standbys_defined) @@ -426,7 +425,7 @@ SyncRepInitConfig(void) ereport(DEBUG1, (errmsg_internal("standby \"%s\" now has synchronous standby priority %u", - application_name, priority))); + application_name, priority))); } } diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index 9a0e3806fc..b94910bfe9 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -747,8 +747,8 @@ WalRcvFetchTimeLineHistoryFiles(TimeLineID first, TimeLineID last) writeTimeLineHistoryFile(tli, content, len); /* - * Mark the streamed history file as ready for archiving - * if archive_mode is always. + * Mark the streamed history file as ready for archiving if + * archive_mode is always. */ if (XLogArchiveMode != ARCHIVE_MODE_ALWAYS) XLogArchiveForceDone(fname); diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index 628c8d49d9..e94069c366 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2326,7 +2326,7 @@ WalSndLoop(WalSndSendDataCallback send_data) { ereport(DEBUG1, (errmsg_internal("\"%s\" has now caught up with upstream server", - application_name))); + application_name))); WalSndSetState(WALSNDSTATE_STREAMING); } @@ -3139,7 +3139,7 @@ WalSndWakeup(void) static void WalSndWait(uint32 socket_events, long timeout, uint32 wait_event) { - WaitEvent event; + WaitEvent event; ModifyWaitEvent(FeBeWaitSet, FeBeWaitSetSocketPos, socket_events, NULL); if (WaitEventSetWait(FeBeWaitSet, timeout, &event, 1, wait_event) == 1 && diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c index ba7decb6a4..d703e9b9ba 100644 --- a/src/backend/statistics/dependencies.c +++ b/src/backend/statistics/dependencies.c @@ -241,8 +241,8 @@ dependency_degree(StatsBuildData *data, int k, AttrNumber *dependency) mss = multi_sort_init(k); /* - * Translate the array of indexes to regular attnums for the dependency (we - * will need this to identify the columns in StatsBuildData). + * Translate the array of indexes to regular attnums for the dependency + * (we will need this to identify the columns in StatsBuildData). */ attnums_dep = (AttrNumber *) palloc(k * sizeof(AttrNumber)); for (i = 0; i < k; i++) diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c index 5e53783ea6..b05e818ba9 100644 --- a/src/backend/statistics/extended_stats.c +++ b/src/backend/statistics/extended_stats.c @@ -91,9 +91,9 @@ typedef struct AnlExprData } AnlExprData; static void compute_expr_stats(Relation onerel, double totalrows, - AnlExprData * exprdata, int nexprs, + AnlExprData *exprdata, int nexprs, HeapTuple *rows, int numrows); -static Datum serialize_expr_stats(AnlExprData * exprdata, int nexprs); +static Datum serialize_expr_stats(AnlExprData *exprdata, int nexprs); static Datum expr_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull); static AnlExprData *build_expr_data(List *exprs, int stattarget); @@ -539,9 +539,9 @@ examine_attribute(Node *expr) /* * When analyzing an expression, believe the expression tree's type not - * the column datatype --- the latter might be the opckeytype storage - * type of the opclass, which is not interesting for our purposes. (Note: - * if we did anything with non-expression statistics columns, we'd need to + * the column datatype --- the latter might be the opckeytype storage type + * of the opclass, which is not interesting for our purposes. (Note: if + * we did anything with non-expression statistics columns, we'd need to * figure out where to get the correct type info from, but for now that's * not a problem.) It's not clear whether anyone will care about the * typmod, but we store that too just in case. @@ -1788,16 +1788,16 @@ statext_mcv_clauselist_selectivity(PlannerInfo *root, List *clauses, int varReli * attnums of expressions from it. Ignore it if it's not fully * covered by the chosen statistics. * - * We need to check both attributes and expressions, and reject - * if either is not covered. + * We need to check both attributes and expressions, and reject if + * either is not covered. */ if (!bms_is_subset(list_attnums[listidx], stat->keys) || !stat_covers_expressions(stat, list_exprs[listidx], NULL)) continue; /* - * Now we know the clause is compatible (we have either attnums - * or expressions extracted from it), and was not estimated yet. + * Now we know the clause is compatible (we have either attnums or + * expressions extracted from it), and was not estimated yet. */ /* record simple clauses (single column or expression) */ diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 0c5b87864b..4b296a22c4 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -3071,7 +3071,7 @@ DropRelFileNodeBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum, int j; RelFileNodeBackend rnode; BlockNumber nForkBlock[MAX_FORKNUM]; - uint64 nBlocksToInvalidate = 0; + uint64 nBlocksToInvalidate = 0; rnode = smgr_reln->smgr_rnode; @@ -3195,7 +3195,7 @@ DropRelFileNodesAllBuffers(SMgrRelation *smgr_reln, int nnodes) int n = 0; SMgrRelation *rels; BlockNumber (*block)[MAX_FORKNUM + 1]; - uint64 nBlocksToInvalidate = 0; + uint64 nBlocksToInvalidate = 0; RelFileNode *nodes; bool cached = true; bool use_bsearch; diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 06b57ae71f..e8cd7ef088 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -3288,7 +3288,7 @@ looks_like_temp_rel_name(const char *name) static void do_syncfs(const char *path) { - int fd; + int fd; fd = OpenTransientFile(path, O_RDONLY); if (fd < 0) @@ -3394,7 +3394,7 @@ SyncDataDirectory(void) do_syncfs("pg_wal"); return; } -#endif /* !HAVE_SYNCFS */ +#endif /* !HAVE_SYNCFS */ /* * If possible, hint to the kernel that we're soon going to fsync the data diff --git a/src/backend/storage/file/sharedfileset.c b/src/backend/storage/file/sharedfileset.c index de422b1ebd..ed37c940ad 100644 --- a/src/backend/storage/file/sharedfileset.c +++ b/src/backend/storage/file/sharedfileset.c @@ -267,8 +267,8 @@ static void SharedFileSetDeleteOnProcExit(int status, Datum arg) { /* - * Remove all the pending shared fileset entries. We don't use foreach() here - * because SharedFileSetDeleteAll will remove the current element in + * Remove all the pending shared fileset entries. We don't use foreach() + * here because SharedFileSetDeleteAll will remove the current element in * filesetlist. Though we have used foreach_delete_current() to remove the * element from filesetlist it could only fix up the state of one of the * loops, see SharedFileSetUnregister. diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index ad781131e2..1d893cf863 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -1655,9 +1655,9 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, (cur_kqueue_event->fflags & NOTE_EXIT) != 0) { /* - * The kernel will tell this kqueue object only once about the exit - * of the postmaster, so let's remember that for next time so that - * we provide level-triggered semantics. + * The kernel will tell this kqueue object only once about the + * exit of the postmaster, so let's remember that for next time so + * that we provide level-triggered semantics. */ set->report_postmaster_not_running = true; diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 5ff8cab394..42a89fc5dc 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -2056,7 +2056,7 @@ GetSnapshotDataInitOldSnapshot(Snapshot snapshot) static bool GetSnapshotDataReuse(Snapshot snapshot) { - uint64 curXactCompletionCount; + uint64 curXactCompletionCount; Assert(LWLockHeldByMe(ProcArrayLock)); @@ -2080,8 +2080,8 @@ GetSnapshotDataReuse(Snapshot snapshot) * holding ProcArrayLock) exclusively). Thus the xactCompletionCount check * ensures we would detect if the snapshot would have changed. * - * As the snapshot contents are the same as it was before, it is safe - * to re-enter the snapshot's xmin into the PGPROC array. None of the rows + * As the snapshot contents are the same as it was before, it is safe to + * re-enter the snapshot's xmin into the PGPROC array. None of the rows * visible under the snapshot could already have been removed (that'd * require the set of running transactions to change) and it fulfills the * requirement that concurrent GetSnapshotData() calls yield the same @@ -2259,10 +2259,10 @@ GetSnapshotData(Snapshot snapshot) continue; /* - * The only way we are able to get here with a non-normal xid - * is during bootstrap - with this backend using - * BootstrapTransactionId. But the above test should filter - * that out. + * The only way we are able to get here with a non-normal xid is + * during bootstrap - with this backend using + * BootstrapTransactionId. But the above test should filter that + * out. */ Assert(TransactionIdIsNormal(xid)); diff --git a/src/backend/storage/ipc/procsignal.c b/src/backend/storage/ipc/procsignal.c index eac6895141..defb75aa26 100644 --- a/src/backend/storage/ipc/procsignal.c +++ b/src/backend/storage/ipc/procsignal.c @@ -61,7 +61,7 @@ */ typedef struct { - volatile pid_t pss_pid; + volatile pid_t pss_pid; volatile sig_atomic_t pss_signalFlags[NUM_PROCSIGNALS]; pg_atomic_uint64 pss_barrierGeneration; pg_atomic_uint32 pss_barrierCheckMask; @@ -454,7 +454,7 @@ ProcessProcSignalBarrier(void) { uint64 local_gen; uint64 shared_gen; - volatile uint32 flags; + volatile uint32 flags; Assert(MyProcSignalSlot); @@ -484,15 +484,15 @@ ProcessProcSignalBarrier(void) * extract the flags, and that any subsequent state changes happen * afterward. * - * NB: In order to avoid race conditions, we must zero pss_barrierCheckMask - * first and only afterwards try to do barrier processing. If we did it - * in the other order, someone could send us another barrier of some - * type right after we called the barrier-processing function but before - * we cleared the bit. We would have no way of knowing that the bit needs - * to stay set in that case, so the need to call the barrier-processing - * function again would just get forgotten. So instead, we tentatively - * clear all the bits and then put back any for which we don't manage - * to successfully absorb the barrier. + * NB: In order to avoid race conditions, we must zero + * pss_barrierCheckMask first and only afterwards try to do barrier + * processing. If we did it in the other order, someone could send us + * another barrier of some type right after we called the + * barrier-processing function but before we cleared the bit. We would + * have no way of knowing that the bit needs to stay set in that case, so + * the need to call the barrier-processing function again would just get + * forgotten. So instead, we tentatively clear all the bits and then put + * back any for which we don't manage to successfully absorb the barrier. */ flags = pg_atomic_exchange_u32(&MyProcSignalSlot->pss_barrierCheckMask, 0); @@ -503,15 +503,15 @@ ProcessProcSignalBarrier(void) */ if (flags != 0) { - bool success = true; + bool success = true; PG_TRY(); { /* * Process each type of barrier. The barrier-processing functions - * should normally return true, but may return false if the barrier - * can't be absorbed at the current time. This should be rare, - * because it's pretty expensive. Every single + * should normally return true, but may return false if the + * barrier can't be absorbed at the current time. This should be + * rare, because it's pretty expensive. Every single * CHECK_FOR_INTERRUPTS() will return here until we manage to * absorb the barrier, and that cost will add up in a hurry. * @@ -521,8 +521,8 @@ ProcessProcSignalBarrier(void) */ while (flags != 0) { - ProcSignalBarrierType type; - bool processed = true; + ProcSignalBarrierType type; + bool processed = true; type = (ProcSignalBarrierType) pg_rightmost_one_pos32(flags); switch (type) @@ -533,8 +533,8 @@ ProcessProcSignalBarrier(void) } /* - * To avoid an infinite loop, we must always unset the bit - * in flags. + * To avoid an infinite loop, we must always unset the bit in + * flags. */ BARRIER_CLEAR_BIT(flags, type); diff --git a/src/backend/storage/ipc/signalfuncs.c b/src/backend/storage/ipc/signalfuncs.c index 0337b00226..837699481c 100644 --- a/src/backend/storage/ipc/signalfuncs.c +++ b/src/backend/storage/ipc/signalfuncs.c @@ -137,11 +137,12 @@ pg_wait_until_termination(int pid, int64 timeout) * Wait in steps of waittime milliseconds until this function exits or * timeout. */ - int64 waittime = 100; + int64 waittime = 100; + /* * Initially remaining time is the entire timeout specified by the user. */ - int64 remainingtime = timeout; + int64 remainingtime = timeout; /* * Check existence of the backend. If the backend still exists, then wait @@ -162,7 +163,7 @@ pg_wait_until_termination(int pid, int64 timeout) ereport(ERROR, (errcode(ERRCODE_INTERNAL_ERROR), errmsg("could not check the existence of the backend with PID %d: %m", - pid))); + pid))); } /* Process interrupts, if any, before waiting */ @@ -198,9 +199,9 @@ pg_wait_until_termination(int pid, int64 timeout) Datum pg_terminate_backend(PG_FUNCTION_ARGS) { - int pid; - int r; - int timeout; + int pid; + int r; + int timeout; pid = PG_GETARG_INT32(0); timeout = PG_GETARG_INT64(1); @@ -208,7 +209,7 @@ pg_terminate_backend(PG_FUNCTION_ARGS) if (timeout < 0) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"timeout\" must not be negative"))); + errmsg("\"timeout\" must not be negative"))); r = pg_signal_backend(pid, SIGTERM); @@ -240,9 +241,9 @@ pg_terminate_backend(PG_FUNCTION_ARGS) Datum pg_wait_for_backend_termination(PG_FUNCTION_ARGS) { - int pid; - int64 timeout; - PGPROC *proc = NULL; + int pid; + int64 timeout; + PGPROC *proc = NULL; pid = PG_GETARG_INT32(0); timeout = PG_GETARG_INT64(1); @@ -250,7 +251,7 @@ pg_wait_for_backend_termination(PG_FUNCTION_ARGS) if (timeout <= 0) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"timeout\" must not be negative or zero"))); + errmsg("\"timeout\" must not be negative or zero"))); proc = BackendPidGetProc(pid); diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 1465ee44a1..553b6e5460 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -482,7 +482,7 @@ ResolveRecoveryConflictWithSnapshotFullXid(FullTransactionId latestRemovedFullXi * snapshots that still see it. */ FullTransactionId nextXid = ReadNextFullTransactionId(); - uint64 diff; + uint64 diff; diff = U64FromFullTransactionId(nextXid) - U64FromFullTransactionId(latestRemovedFullXid); diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 692f21ef6a..2575ea1ca0 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -103,7 +103,7 @@ ProcGlobalShmemSize(void) { Size size = 0; Size TotalProcs = - add_size(MaxBackends, add_size(NUM_AUXILIARY_PROCS, max_prepared_xacts)); + add_size(MaxBackends, add_size(NUM_AUXILIARY_PROCS, max_prepared_xacts)); /* ProcGlobal */ size = add_size(size, sizeof(PROC_HDR)); @@ -1245,8 +1245,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) /* * Set timer so we can wake up after awhile and check for a deadlock. If a * deadlock is detected, the handler sets MyProc->waitStatus = - * PROC_WAIT_STATUS_ERROR, allowing us to know that we must report failure rather - * than success. + * PROC_WAIT_STATUS_ERROR, allowing us to know that we must report failure + * rather than success. * * By delaying the check until we've waited for a bit, we can avoid * running the rather expensive deadlock-check code in most cases. @@ -1371,9 +1371,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) } /* - * waitStatus could change from PROC_WAIT_STATUS_WAITING to something else - * asynchronously. Read it just once per loop to prevent surprising - * behavior (such as missing log messages). + * waitStatus could change from PROC_WAIT_STATUS_WAITING to something + * else asynchronously. Read it just once per loop to prevent + * surprising behavior (such as missing log messages). */ myWaitStatus = *((volatile ProcWaitStatus *) &MyProc->waitStatus); @@ -1429,7 +1429,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) ereport(DEBUG1, (errmsg_internal("sending cancel to blocking autovacuum PID %d", - pid), + pid), errdetail_log("%s", logbuf.data))); pfree(locktagbuf.data); @@ -1587,11 +1587,12 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) /* * Currently, the deadlock checker always kicks its own - * process, which means that we'll only see PROC_WAIT_STATUS_ERROR when - * deadlock_state == DS_HARD_DEADLOCK, and there's no need to - * print redundant messages. But for completeness and - * future-proofing, print a message if it looks like someone - * else kicked us off the lock. + * process, which means that we'll only see + * PROC_WAIT_STATUS_ERROR when deadlock_state == + * DS_HARD_DEADLOCK, and there's no need to print redundant + * messages. But for completeness and future-proofing, print + * a message if it looks like someone else kicked us off the + * lock. */ if (deadlock_state != DS_HARD_DEADLOCK) ereport(LOG, @@ -1830,9 +1831,9 @@ CheckDeadLock(void) * preserve the flexibility to kill some other transaction than the * one detecting the deadlock.) * - * RemoveFromWaitQueue sets MyProc->waitStatus to PROC_WAIT_STATUS_ERROR, so - * ProcSleep will report an error after we return from the signal - * handler. + * RemoveFromWaitQueue sets MyProc->waitStatus to + * PROC_WAIT_STATUS_ERROR, so ProcSleep will report an error after we + * return from the signal handler. */ Assert(MyProc->waitLock != NULL); RemoveFromWaitQueue(MyProc, LockTagHashCode(&(MyProc->waitLock->tag))); diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c index 6fe0c6532c..557672cadd 100644 --- a/src/backend/storage/lmgr/spin.c +++ b/src/backend/storage/lmgr/spin.c @@ -37,7 +37,7 @@ #define NUM_EMULATION_SEMAPHORES (NUM_SPINLOCK_SEMAPHORES + NUM_ATOMICS_SEMAPHORES) #else #define NUM_EMULATION_SEMAPHORES (NUM_SPINLOCK_SEMAPHORES) -#endif /* DISABLE_ATOMICS */ +#endif /* DISABLE_ATOMICS */ PGSemaphore *SpinlockSemaArray; diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c index b231c438f9..82ca91f597 100644 --- a/src/backend/storage/page/bufpage.c +++ b/src/backend/storage/page/bufpage.c @@ -259,7 +259,7 @@ PageAddItemExtended(Page page, * group at the end of the line pointer array. */ for (offsetNumber = FirstOffsetNumber; - offsetNumber < limit; /* limit is maxoff+1 */ + offsetNumber < limit; /* limit is maxoff+1 */ offsetNumber++) { itemId = PageGetItemId(phdr, offsetNumber); diff --git a/src/backend/storage/sync/sync.c b/src/backend/storage/sync/sync.c index 708215614d..bc3ceb2712 100644 --- a/src/backend/storage/sync/sync.c +++ b/src/backend/storage/sync/sync.c @@ -420,7 +420,7 @@ ProcessSyncRequests(void) ereport(DEBUG1, (errcode_for_file_access(), errmsg_internal("could not fsync file \"%s\" but retrying: %m", - path))); + path))); /* * Absorb incoming requests and check to see if a cancel diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 2d6d145ecc..6200699ddd 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -454,7 +454,7 @@ SocketBackend(StringInfo inBuf) * the type. */ if (pq_getmessage(inBuf, maxmsglen)) - return EOF; /* suitable message already logged */ + return EOF; /* suitable message already logged */ RESUME_CANCEL_INTERRUPTS(); return qtype; @@ -1350,8 +1350,8 @@ exec_parse_message(const char *query_string, /* string to execute */ ereport(DEBUG2, (errmsg_internal("parse %s: %s", - *stmt_name ? stmt_name : "", - query_string))); + *stmt_name ? stmt_name : "", + query_string))); /* * Start up a transaction command so we can run parse analysis etc. (Note @@ -1606,8 +1606,8 @@ exec_bind_message(StringInfo input_message) ereport(DEBUG2, (errmsg_internal("bind %s to %s", - *portal_name ? portal_name : "", - *stmt_name ? stmt_name : ""))); + *portal_name ? portal_name : "", + *stmt_name ? stmt_name : ""))); /* Find prepared statement */ if (stmt_name[0] != '\0') diff --git a/src/backend/utils/activity/backend_progress.c b/src/backend/utils/activity/backend_progress.c index 293254993c..6743e68cef 100644 --- a/src/backend/utils/activity/backend_progress.c +++ b/src/backend/utils/activity/backend_progress.c @@ -10,7 +10,7 @@ */ #include "postgres.h" -#include "port/atomics.h" /* for memory barriers */ +#include "port/atomics.h" /* for memory barriers */ #include "utils/backend_progress.h" #include "utils/backend_status.h" diff --git a/src/backend/utils/activity/backend_status.c b/src/backend/utils/activity/backend_status.c index a368101103..2901f9f5a9 100644 --- a/src/backend/utils/activity/backend_status.c +++ b/src/backend/utils/activity/backend_status.c @@ -16,13 +16,13 @@ #include "miscadmin.h" #include "pg_trace.h" #include "pgstat.h" -#include "port/atomics.h" /* for memory barriers */ +#include "port/atomics.h" /* for memory barriers */ #include "storage/ipc.h" -#include "storage/proc.h" /* for MyProc */ +#include "storage/proc.h" /* for MyProc */ #include "storage/sinvaladt.h" #include "utils/ascii.h" #include "utils/backend_status.h" -#include "utils/guc.h" /* for application_name */ +#include "utils/guc.h" /* for application_name */ #include "utils/memutils.h" @@ -498,8 +498,8 @@ pgstat_setup_backend_status_context(void) { if (!backendStatusSnapContext) backendStatusSnapContext = AllocSetContextCreate(TopMemoryContext, - "Backend Status Snapshot", - ALLOCSET_SMALL_SIZES); + "Backend Status Snapshot", + ALLOCSET_SMALL_SIZES); } @@ -1033,7 +1033,8 @@ pgstat_get_my_query_id(void) if (!MyBEEntry) return 0; - /* There's no need for a lock around pgstat_begin_read_activity / + /* + * There's no need for a lock around pgstat_begin_read_activity / * pgstat_end_read_activity here as it's only called from * pg_stat_get_activity which is already protected, or from the same * backend which means that there won't be concurrent writes. diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c index 89b5b8b7b9..6baf67740c 100644 --- a/src/backend/utils/activity/wait_event.c +++ b/src/backend/utils/activity/wait_event.c @@ -22,8 +22,8 @@ */ #include "postgres.h" -#include "storage/lmgr.h" /* for GetLockNameFromTagType */ -#include "storage/lwlock.h" /* for GetLWLockIdentifier */ +#include "storage/lmgr.h" /* for GetLockNameFromTagType */ +#include "storage/lwlock.h" /* for GetLWLockIdentifier */ #include "utils/wait_event.h" diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 7861a0a613..67f8b29434 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -2453,9 +2453,9 @@ column_privilege_check(Oid tableoid, AttrNumber attnum, return -1; /* - * Check for column-level privileges first. This serves in - * part as a check on whether the column even exists, so we - * need to do it before checking table-level privilege. + * Check for column-level privileges first. This serves in part as a check + * on whether the column even exists, so we need to do it before checking + * table-level privilege. */ aclresult = pg_attribute_aclcheck_ext(tableoid, attnum, roleid, mode, &is_missing); diff --git a/src/backend/utils/adt/dbsize.c b/src/backend/utils/adt/dbsize.c index da1a879f1f..3c70bb5943 100644 --- a/src/backend/utils/adt/dbsize.c +++ b/src/backend/utils/adt/dbsize.c @@ -867,7 +867,7 @@ pg_relation_filenode(PG_FUNCTION_ARGS) { if (relform->relfilenode) result = relform->relfilenode; - else /* Consult the relation mapper */ + else /* Consult the relation mapper */ result = RelationMapOidToFilenode(relid, relform->relisshared); } @@ -946,17 +946,17 @@ pg_relation_filepath(PG_FUNCTION_ARGS) rnode.dbNode = MyDatabaseId; if (relform->relfilenode) rnode.relNode = relform->relfilenode; - else /* Consult the relation mapper */ + else /* Consult the relation mapper */ rnode.relNode = RelationMapOidToFilenode(relid, relform->relisshared); } else { - /* no storage, return NULL */ - rnode.relNode = InvalidOid; - /* some compilers generate warnings without these next two lines */ - rnode.dbNode = InvalidOid; - rnode.spcNode = InvalidOid; + /* no storage, return NULL */ + rnode.relNode = InvalidOid; + /* some compilers generate warnings without these next two lines */ + rnode.dbNode = InvalidOid; + rnode.spcNode = InvalidOid; } if (!OidIsValid(rnode.relNode)) diff --git a/src/backend/utils/adt/genfile.c b/src/backend/utils/adt/genfile.c index 322152ebd9..c436d9318b 100644 --- a/src/backend/utils/adt/genfile.c +++ b/src/backend/utils/adt/genfile.c @@ -160,16 +160,15 @@ read_binary_file(const char *filename, int64 seek_offset, int64 bytes_to_read, #define MIN_READ_SIZE 4096 /* - * If not at end of file, and sbuf.len is equal to - * MaxAllocSize - 1, then either the file is too large, or - * there is nothing left to read. Attempt to read one more - * byte to see if the end of file has been reached. If not, - * the file is too large; we'd rather give the error message - * for that ourselves. + * If not at end of file, and sbuf.len is equal to MaxAllocSize - + * 1, then either the file is too large, or there is nothing left + * to read. Attempt to read one more byte to see if the end of + * file has been reached. If not, the file is too large; we'd + * rather give the error message for that ourselves. */ if (sbuf.len == MaxAllocSize - 1) { - char rbuf[1]; + char rbuf[1]; if (fread(rbuf, 1, 1, file) != 0 || !feof(file)) ereport(ERROR, diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.c index 97f0265c12..085fec3ea2 100644 --- a/src/backend/utils/adt/lockfuncs.c +++ b/src/backend/utils/adt/lockfuncs.c @@ -636,10 +636,10 @@ pg_isolation_test_session_is_blocked(PG_FUNCTION_ARGS) * Check if any of these are in the list of interesting PIDs, that being * the sessions that the isolation tester is running. We don't use * "arrayoverlaps" here, because it would lead to cache lookups and one of - * our goals is to run quickly with debug_invalidate_system_caches_always > 0. We expect - * blocking_pids to be usually empty and otherwise a very small number in - * isolation tester cases, so make that the outer loop of a naive search - * for a match. + * our goals is to run quickly with debug_invalidate_system_caches_always + * > 0. We expect blocking_pids to be usually empty and otherwise a very + * small number in isolation tester cases, so make that the outer loop of + * a naive search for a match. */ for (i = 0; i < num_blocking_pids; i++) for (j = 0; j < num_interesting_pids; j++) diff --git a/src/backend/utils/adt/mcxtfuncs.c b/src/backend/utils/adt/mcxtfuncs.c index e2b87a7ed9..2984768d19 100644 --- a/src/backend/utils/adt/mcxtfuncs.c +++ b/src/backend/utils/adt/mcxtfuncs.c @@ -34,8 +34,8 @@ */ static void PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, - TupleDesc tupdesc, MemoryContext context, - const char *parent, int level) + TupleDesc tupdesc, MemoryContext context, + const char *parent, int level) { #define PG_GET_BACKEND_MEMORY_CONTEXTS_COLS 9 @@ -52,8 +52,8 @@ PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, ident = context->ident; /* - * To be consistent with logging output, we label dynahash contexts - * with just the hash table name as with MemoryContextStatsPrint(). + * To be consistent with logging output, we label dynahash contexts with + * just the hash table name as with MemoryContextStatsPrint(). */ if (ident && strcmp(name, "dynahash") == 0) { @@ -75,7 +75,7 @@ PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, if (ident) { - int idlen = strlen(ident); + int idlen = strlen(ident); char clipped_ident[MEMORY_CONTEXT_IDENT_DISPLAY_SIZE]; /* @@ -108,7 +108,7 @@ PutMemoryContextsStatsTupleStore(Tuplestorestate *tupstore, for (child = context->firstchild; child != NULL; child = child->nextchild) { PutMemoryContextsStatsTupleStore(tupstore, tupdesc, - child, name, level + 1); + child, name, level + 1); } } @@ -150,7 +150,7 @@ pg_get_backend_memory_contexts(PG_FUNCTION_ARGS) MemoryContextSwitchTo(oldcontext); PutMemoryContextsStatsTupleStore(tupstore, tupdesc, - TopMemoryContext, NULL, 0); + TopMemoryContext, NULL, 0); /* clean up and return the tuplestore */ tuplestore_donestoring(tupstore); diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c index c93be3350e..602a724d2f 100644 --- a/src/backend/utils/adt/name.c +++ b/src/backend/utils/adt/name.c @@ -234,7 +234,7 @@ namestrcpy(Name name, const char *str) { /* NB: We need to zero-pad the destination. */ strncpy(NameStr(*name), str, NAMEDATALEN); - NameStr(*name)[NAMEDATALEN-1] = '\0'; + NameStr(*name)[NAMEDATALEN - 1] = '\0'; } /* diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c index caa09d6373..453af401ca 100644 --- a/src/backend/utils/adt/pg_locale.c +++ b/src/backend/utils/adt/pg_locale.c @@ -1668,16 +1668,16 @@ get_collation_actual_version(char collprovider, const char *collcollate) } else #endif - if (collprovider == COLLPROVIDER_LIBC && - pg_strcasecmp("C", collcollate) != 0 && - pg_strncasecmp("C.", collcollate, 2) != 0 && - pg_strcasecmp("POSIX", collcollate) != 0) + if (collprovider == COLLPROVIDER_LIBC && + pg_strcasecmp("C", collcollate) != 0 && + pg_strncasecmp("C.", collcollate, 2) != 0 && + pg_strcasecmp("POSIX", collcollate) != 0) { #if defined(__GLIBC__) /* Use the glibc version because we don't have anything better. */ collversion = pstrdup(gnu_get_libc_version()); #elif defined(LC_VERSION_MASK) - locale_t loc; + locale_t loc; /* Look up FreeBSD collation version. */ loc = newlocale(LC_COLLATE, collcollate, NULL); diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c index 2c10f2c867..671fe6ddb7 100644 --- a/src/backend/utils/adt/rangetypes_typanalyze.c +++ b/src/backend/utils/adt/rangetypes_typanalyze.c @@ -330,7 +330,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, stats->statypid[slot_idx] = typcache->type_id; stats->statyplen[slot_idx] = typcache->typlen; stats->statypbyval[slot_idx] = typcache->typbyval; - stats->statypalign[slot_idx] = typcache->typalign; + stats->statypalign[slot_idx] = typcache->typalign; slot_idx++; } diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index 7c77c338ce..96269fc2ad 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -394,8 +394,8 @@ RI_FKey_check(TriggerData *trigdata) * Now check that foreign key exists in PK table * * XXX detectNewRows must be true when a partitioned table is on the - * referenced side. The reason is that our snapshot must be fresh - * in order for the hack in find_inheritance_children() to work. + * referenced side. The reason is that our snapshot must be fresh in + * order for the hack in find_inheritance_children() to work. */ ri_PerformCheck(riinfo, &qkey, qplan, fk_rel, pk_rel, diff --git a/src/backend/utils/adt/rowtypes.c b/src/backend/utils/adt/rowtypes.c index 23787a6ae7..1a71fdbc33 100644 --- a/src/backend/utils/adt/rowtypes.c +++ b/src/backend/utils/adt/rowtypes.c @@ -1802,8 +1802,8 @@ hash_record(PG_FUNCTION_ARGS) tuple.t_data = record; /* - * We arrange to look up the needed hashing info just once per series - * of calls, assuming the record type doesn't change underneath us. + * We arrange to look up the needed hashing info just once per series of + * calls, assuming the record type doesn't change underneath us. */ my_extra = (RecordCompareData *) fcinfo->flinfo->fn_extra; if (my_extra == NULL || @@ -1923,8 +1923,8 @@ hash_record_extended(PG_FUNCTION_ARGS) tuple.t_data = record; /* - * We arrange to look up the needed hashing info just once per series - * of calls, assuming the record type doesn't change underneath us. + * We arrange to look up the needed hashing info just once per series of + * calls, assuming the record type doesn't change underneath us. */ my_extra = (RecordCompareData *) fcinfo->flinfo->fn_extra; if (my_extra == NULL || diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 881e8ec03d..84ad62caea 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -2980,37 +2980,38 @@ pg_get_functiondef(PG_FUNCTION_ARGS) } else { - appendStringInfoString(&buf, "AS "); + appendStringInfoString(&buf, "AS "); - tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_probin, &isnull); - if (!isnull) - { - simple_quote_literal(&buf, TextDatumGetCString(tmp)); - appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */ - } + tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_probin, &isnull); + if (!isnull) + { + simple_quote_literal(&buf, TextDatumGetCString(tmp)); + appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */ + } - tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_prosrc, &isnull); - if (isnull) - elog(ERROR, "null prosrc"); - prosrc = TextDatumGetCString(tmp); + tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_prosrc, &isnull); + if (isnull) + elog(ERROR, "null prosrc"); + prosrc = TextDatumGetCString(tmp); - /* - * We always use dollar quoting. Figure out a suitable delimiter. - * - * Since the user is likely to be editing the function body string, we - * shouldn't use a short delimiter that he might easily create a conflict - * with. Hence prefer "$function$"/"$procedure$", but extend if needed. - */ - initStringInfo(&dq); - appendStringInfoChar(&dq, '$'); - appendStringInfoString(&dq, (isfunction ? "function" : "procedure")); - while (strstr(prosrc, dq.data) != NULL) - appendStringInfoChar(&dq, 'x'); - appendStringInfoChar(&dq, '$'); + /* + * We always use dollar quoting. Figure out a suitable delimiter. + * + * Since the user is likely to be editing the function body string, we + * shouldn't use a short delimiter that he might easily create a + * conflict with. Hence prefer "$function$"/"$procedure$", but extend + * if needed. + */ + initStringInfo(&dq); + appendStringInfoChar(&dq, '$'); + appendStringInfoString(&dq, (isfunction ? "function" : "procedure")); + while (strstr(prosrc, dq.data) != NULL) + appendStringInfoChar(&dq, 'x'); + appendStringInfoChar(&dq, '$'); - appendBinaryStringInfo(&buf, dq.data, dq.len); - appendStringInfoString(&buf, prosrc); - appendBinaryStringInfo(&buf, dq.data, dq.len); + appendBinaryStringInfo(&buf, dq.data, dq.len); + appendStringInfoString(&buf, prosrc); + appendBinaryStringInfo(&buf, dq.data, dq.len); } appendStringInfoChar(&buf, '\n'); diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 3d4304cce7..37ddda7724 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -3446,10 +3446,10 @@ estimate_num_groups(PlannerInfo *root, List *groupExprs, double input_rows, * XXX This has the consequence that if there's a statistics on the * expression, we don't split it into individual Vars. This affects * our selection of statistics in estimate_multivariate_ndistinct, - * because it's probably better to use more accurate estimate for - * each expression and treat them as independent, than to combine - * estimates for the extracted variables when we don't know how that - * relates to the expressions. + * because it's probably better to use more accurate estimate for each + * expression and treat them as independent, than to combine estimates + * for the extracted variables when we don't know how that relates to + * the expressions. */ examine_variable(root, groupexpr, 0, &vardata); if (HeapTupleIsValid(vardata.statsTuple) || vardata.isunique) @@ -4039,16 +4039,16 @@ estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel, /* * Process a simple Var expression, by matching it to keys - * directly. If there's a matching expression, we'll try - * matching it later. + * directly. If there's a matching expression, we'll try matching + * it later. */ if (IsA(varinfo->var, Var)) { AttrNumber attnum = ((Var *) varinfo->var)->varattno; /* - * Ignore expressions on system attributes. Can't rely on - * the bms check for negative values. + * Ignore expressions on system attributes. Can't rely on the + * bms check for negative values. */ if (!AttrNumberIsForUserDefinedAttr(attnum)) continue; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 3a93e92e40..79761f809c 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -3847,8 +3847,8 @@ timestamp_bin(PG_FUNCTION_ARGS) tm_delta = tm_diff - tm_diff % stride_usecs; /* - * Make sure the returned timestamp is at the start of the bin, - * even if the origin is in the future. + * Make sure the returned timestamp is at the start of the bin, even if + * the origin is in the future. */ if (origin > timestamp && stride_usecs > 1) tm_delta -= stride_usecs; @@ -4025,8 +4025,8 @@ timestamptz_bin(PG_FUNCTION_ARGS) tm_delta = tm_diff - tm_diff % stride_usecs; /* - * Make sure the returned timestamp is at the start of the bin, - * even if the origin is in the future. + * Make sure the returned timestamp is at the start of the bin, even if + * the origin is in the future. */ if (origin > timestamp && stride_usecs > 1) tm_delta -= stride_usecs; diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 0c6e5f24ba..d2a11b1b5d 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -307,7 +307,7 @@ byteain(PG_FUNCTION_ARGS) size_t len = strlen(inputText); uint64 dstlen = pg_hex_dec_len(len - 2); - bc = dstlen + VARHDRSZ; /* maximum possible length */ + bc = dstlen + VARHDRSZ; /* maximum possible length */ result = palloc(bc); bc = pg_hex_decode(inputText + 2, len - 2, VARDATA(result), dstlen); diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index f54dc12b71..dcfd9e8389 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -181,7 +181,7 @@ static int numSharedInvalidMessagesArray; static int maxSharedInvalidMessagesArray; /* GUC storage */ -int debug_invalidate_system_caches_always = 0; +int debug_invalidate_system_caches_always = 0; /* * Dynamically-registered callback functions. Current implementation @@ -692,26 +692,27 @@ AcceptInvalidationMessages(void) /* * Test code to force cache flushes anytime a flush could happen. * - * This helps detect intermittent faults caused by code that reads a - * cache entry and then performs an action that could invalidate the entry, - * but rarely actually does so. This can spot issues that would otherwise + * This helps detect intermittent faults caused by code that reads a cache + * entry and then performs an action that could invalidate the entry, but + * rarely actually does so. This can spot issues that would otherwise * only arise with badly timed concurrent DDL, for example. * - * The default debug_invalidate_system_caches_always = 0 does no forced cache flushes. + * The default debug_invalidate_system_caches_always = 0 does no forced + * cache flushes. * - * If used with CLOBBER_FREED_MEMORY, debug_invalidate_system_caches_always = 1 - * (CLOBBER_CACHE_ALWAYS) provides a fairly thorough test that the system - * contains no cache-flush hazards. However, it also makes the system - * unbelievably slow --- the regression tests take about 100 times longer - * than normal. + * If used with CLOBBER_FREED_MEMORY, + * debug_invalidate_system_caches_always = 1 (CLOBBER_CACHE_ALWAYS) + * provides a fairly thorough test that the system contains no cache-flush + * hazards. However, it also makes the system unbelievably slow --- the + * regression tests take about 100 times longer than normal. * - * If you're a glutton for punishment, try debug_invalidate_system_caches_always = 3 - * (CLOBBER_CACHE_RECURSIVELY). This slows things by at least a factor - * of 10000, so I wouldn't suggest trying to run the entire regression - * tests that way. It's useful to try a few simple tests, to make sure - * that cache reload isn't subject to internal cache-flush hazards, but - * after you've done a few thousand recursive reloads it's unlikely - * you'll learn more. + * If you're a glutton for punishment, try + * debug_invalidate_system_caches_always = 3 (CLOBBER_CACHE_RECURSIVELY). + * This slows things by at least a factor of 10000, so I wouldn't suggest + * trying to run the entire regression tests that way. It's useful to try + * a few simple tests, to make sure that cache reload isn't subject to + * internal cache-flush hazards, but after you've done a few thousand + * recursive reloads it's unlikely you'll learn more. */ #ifdef CLOBBER_CACHE_ENABLED { diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index 1a0950489d..07b0145132 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -897,8 +897,9 @@ BuildCachedPlan(CachedPlanSource *plansource, List *qlist, * rejected a generic plan, it's possible to reach here with is_valid * false due to an invalidation while making the generic plan. In theory * the invalidation must be a false positive, perhaps a consequence of an - * sinval reset event or the debug_invalidate_system_caches_always code. But for - * safety, let's treat it as real and redo the RevalidateCachedQuery call. + * sinval reset event or the debug_invalidate_system_caches_always code. + * But for safety, let's treat it as real and redo the + * RevalidateCachedQuery call. */ if (!plansource->is_valid) qlist = RevalidateCachedQuery(plansource, queryEnv); diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index bd88f6105b..fd05615e76 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -1016,9 +1016,9 @@ RelationBuildDesc(Oid targetRelId, bool insertIt) * * When cache clobbering is enabled or when forced to by * RECOVER_RELATION_BUILD_MEMORY=1, arrange to allocate the junk in a - * temporary context that we'll free before returning. Make it a child - * of caller's context so that it will get cleaned up appropriately if - * we error out partway through. + * temporary context that we'll free before returning. Make it a child of + * caller's context so that it will get cleaned up appropriately if we + * error out partway through. */ #ifdef MAYBE_RECOVER_RELATION_BUILD_MEMORY MemoryContext tmpcxt = NULL; diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c index 4915ef5934..35c8cf7b24 100644 --- a/src/backend/utils/cache/typcache.c +++ b/src/backend/utils/cache/typcache.c @@ -696,7 +696,7 @@ lookup_type_cache(Oid type_id, int flags) !record_fields_have_hashing(typentry)) hash_proc = InvalidOid; else if (hash_proc == F_HASH_RANGE && - !range_element_has_hashing(typentry)) + !range_element_has_hashing(typentry)) hash_proc = InvalidOid; /* @@ -742,10 +742,10 @@ lookup_type_cache(Oid type_id, int flags) !array_element_has_extended_hashing(typentry)) hash_extended_proc = InvalidOid; else if (hash_extended_proc == F_HASH_RECORD_EXTENDED && - !record_fields_have_extended_hashing(typentry)) + !record_fields_have_extended_hashing(typentry)) hash_extended_proc = InvalidOid; else if (hash_extended_proc == F_HASH_RANGE_EXTENDED && - !range_element_has_extended_hashing(typentry)) + !range_element_has_extended_hashing(typentry)) hash_extended_proc = InvalidOid; /* diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 65019989cf..a3e1c59a82 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -2717,10 +2717,10 @@ log_line_prefix(StringInfo buf, ErrorData *edata) case 'Q': if (padding != 0) appendStringInfo(buf, "%*lld", padding, - (long long) pgstat_get_my_query_id()); + (long long) pgstat_get_my_query_id()); else appendStringInfo(buf, "%lld", - (long long) pgstat_get_my_query_id()); + (long long) pgstat_get_my_query_id()); break; default: /* format error - ignore it */ diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm index adfe12b2c2..5ad38514be 100644 --- a/src/backend/utils/mb/Unicode/convutils.pm +++ b/src/backend/utils/mb/Unicode/convutils.pm @@ -381,7 +381,7 @@ sub print_radix_table header => "Dummy map, for invalid values", min_idx => 0, max_idx => $widest_range, - label => "dummy map" + label => "dummy map" }; ### diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 0a180341c2..eb7f7181e4 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -2636,7 +2636,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &vacuum_defer_cleanup_age, - 0, 0, 1000000, /* see ComputeXidHorizons */ + 0, 0, 1000000, /* see ComputeXidHorizons */ NULL, NULL, NULL }, { @@ -3257,6 +3257,7 @@ static struct config_int ConfigureNamesInt[] = NULL }, &autovacuum_freeze_max_age, + /* * see pg_resetwal and vacuum_failsafe_age if you change the * upper-limit value. @@ -3513,9 +3514,9 @@ static struct config_int ConfigureNamesInt[] = 0, #endif 0, 5, -#else /* not CLOBBER_CACHE_ENABLED */ +#else /* not CLOBBER_CACHE_ENABLED */ 0, 0, 0, -#endif /* not CLOBBER_CACHE_ENABLED */ +#endif /* not CLOBBER_CACHE_ENABLED */ NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/queryjumble.c b/src/backend/utils/misc/queryjumble.c index 1bb9fe20ea..f004a9ce8c 100644 --- a/src/backend/utils/misc/queryjumble.c +++ b/src/backend/utils/misc/queryjumble.c @@ -55,8 +55,8 @@ static void RecordConstLocation(JumbleState *jstate, int location); const char * CleanQuerytext(const char *query, int *location, int *len) { - int query_location = *location; - int query_len = *len; + int query_location = *location; + int query_len = *len; /* First apply starting offset, unless it's -1 (unknown). */ if (query_location >= 0) @@ -95,11 +95,12 @@ JumbleState * JumbleQuery(Query *query, const char *querytext) { JumbleState *jstate = NULL; + if (query->utilityStmt) { query->queryId = compute_utility_query_id(querytext, - query->stmt_location, - query->stmt_len); + query->stmt_location, + query->stmt_len); } else { @@ -137,12 +138,12 @@ JumbleQuery(Query *query, const char *querytext) static uint64 compute_utility_query_id(const char *query_text, int query_location, int query_len) { - uint64 queryId; + uint64 queryId; const char *sql; /* - * Confine our attention to the relevant part of the string, if the - * query is a portion of a multi-statement source string. + * Confine our attention to the relevant part of the string, if the query + * is a portion of a multi-statement source string. */ sql = CleanQuerytext(query_text, &query_location, &query_len); @@ -150,9 +151,8 @@ compute_utility_query_id(const char *query_text, int query_location, int query_l query_len, 0)); /* - * If we are unlucky enough to get a hash of zero(invalid), use - * queryID as 2 instead, queryID 1 is already in use for normal - * statements. + * If we are unlucky enough to get a hash of zero(invalid), use queryID as + * 2 instead, queryID 1 is already in use for normal statements. */ if (queryId == UINT64CONST(0)) queryId = UINT64CONST(2); diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c index 089ba2e106..cafc087254 100644 --- a/src/backend/utils/sort/logtape.c +++ b/src/backend/utils/sort/logtape.c @@ -1275,6 +1275,7 @@ LogicalTapeSetBlocks(LogicalTapeSet *lts) for (int i = 0; i < lts->nTapes; i++) { LogicalTape *lt = <s->tapes[i]; + Assert(!lt->writing || lt->buffer == NULL); } #endif diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 95704265b6..2968c7f7b7 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -1808,8 +1808,8 @@ TransactionIdLimitedForOldSnapshots(TransactionId recentXmin, if (ts == threshold_timestamp) { /* - * Current timestamp is in same bucket as the last limit that - * was applied. Reuse. + * Current timestamp is in same bucket as the last limit that was + * applied. Reuse. */ xlimit = threshold_xid; } @@ -1965,13 +1965,13 @@ MaintainOldSnapshotTimeMapping(TimestampTz whenTaken, TransactionId xmin) * number of minutes of difference between ts and the current * head_timestamp. * - * The distance from the current head to the current tail is one - * less than the number of entries in the mapping, because the - * entry at the head_offset is for 0 minutes after head_timestamp. + * The distance from the current head to the current tail is one less + * than the number of entries in the mapping, because the entry at the + * head_offset is for 0 minutes after head_timestamp. * - * The difference between these two values is the number of minutes - * by which we need to advance the mapping, either adding new entries - * or rotating old ones out. + * The difference between these two values is the number of minutes by + * which we need to advance the mapping, either adding new entries or + * rotating old ones out. */ distance_to_new_tail = (ts - oldSnapshotControl->head_timestamp) / USECS_PER_MINUTE; diff --git a/src/bin/pg_amcheck/pg_amcheck.c b/src/bin/pg_amcheck/pg_amcheck.c index 09ebb4929a..58a45b47b2 100644 --- a/src/bin/pg_amcheck/pg_amcheck.c +++ b/src/bin/pg_amcheck/pg_amcheck.c @@ -564,8 +564,8 @@ main(int argc, char *argv[]) */ if (opts.install_missing) { - char *schema; - char *install_sql; + char *schema; + char *install_sql; /* * Must re-escape the schema name for each database, as the diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl index 7c446064ab..5f712ee32a 100644 --- a/src/bin/pg_amcheck/t/002_nonesuch.pl +++ b/src/bin/pg_amcheck/t/002_nonesuch.pl @@ -24,25 +24,26 @@ $node->safe_psql('postgres', q(CREATE EXTENSION amcheck)); # Failing to connect to the initial database is an error. $node->command_checks_all( [ 'pg_amcheck', 'qqq' ], - 1, - [ qr/^$/ ], - [ qr/FATAL: database "qqq" does not exist/ ], + 1, [qr/^$/], + [qr/FATAL: database "qqq" does not exist/], 'checking a non-existent database'); # Failing to resolve a database pattern is an error by default. $node->command_checks_all( [ 'pg_amcheck', '-d', 'qqq', '-d', 'postgres' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no connectable databases to check matching "qqq"/ ], + [qr/^$/], + [qr/pg_amcheck: error: no connectable databases to check matching "qqq"/], 'checking an unresolvable database pattern'); # But only a warning under --no-strict-names $node->command_checks_all( [ 'pg_amcheck', '--no-strict-names', '-d', 'qqq', '-d', 'postgres' ], 0, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: no connectable databases to check matching "qqq"/ ], + [qr/^$/], + [ + qr/pg_amcheck: warning: no connectable databases to check matching "qqq"/ + ], 'checking an unresolvable database pattern under --no-strict-names'); # Check that a substring of an existent database name does not get interpreted @@ -50,29 +51,31 @@ $node->command_checks_all( $node->command_checks_all( [ 'pg_amcheck', '-d', 'post', '-d', 'postgres' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no connectable databases to check matching "post"/ ], - 'checking an unresolvable database pattern (substring of existent database)'); + [qr/^$/], + [ + qr/pg_amcheck: error: no connectable databases to check matching "post"/ + ], + 'checking an unresolvable database pattern (substring of existent database)' +); # Check that a superstring of an existent database name does not get interpreted # as a matching pattern. $node->command_checks_all( [ 'pg_amcheck', '-d', 'postgresql', '-d', 'postgres' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no connectable databases to check matching "postgresql"/ ], - 'checking an unresolvable database pattern (superstring of existent database)'); + [qr/^$/], + [ + qr/pg_amcheck: error: no connectable databases to check matching "postgresql"/ + ], + 'checking an unresolvable database pattern (superstring of existent database)' +); ######################################### # Test connecting with a non-existent user # Failing to connect to the initial database due to bad username is an error. -$node->command_checks_all( - [ 'pg_amcheck', '-U', 'no_such_user', 'postgres' ], - 1, - [ qr/^$/ ], - [ ], - 'checking with a non-existent user'); +$node->command_checks_all([ 'pg_amcheck', '-U', 'no_such_user', 'postgres' ], + 1, [qr/^$/], [], 'checking with a non-existent user'); ######################################### # Test checking databases without amcheck installed @@ -83,26 +86,35 @@ $node->command_checks_all( $node->command_checks_all( [ 'pg_amcheck', 'template1' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, - qr/pg_amcheck: error: no relations to check/ ], - 'checking a database by name without amcheck installed, no other databases'); + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, + qr/pg_amcheck: error: no relations to check/ + ], + 'checking a database by name without amcheck installed, no other databases' +); # Again, but this time with another database to check, so no error is raised. $node->command_checks_all( [ 'pg_amcheck', '-d', 'template1', '-d', 'postgres' ], 0, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/ ], - 'checking a database by name without amcheck installed, with other databases'); + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/ + ], + 'checking a database by name without amcheck installed, with other databases' +); # Again, but by way of checking all databases $node->command_checks_all( [ 'pg_amcheck', '--all' ], 0, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/ ], - 'checking a database by pattern without amcheck installed, with other databases'); + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/ + ], + 'checking a database by pattern without amcheck installed, with other databases' +); ######################################### # Test unreasonable patterns @@ -111,24 +123,28 @@ $node->command_checks_all( $node->command_checks_all( [ 'pg_amcheck', '-d', 'postgres', '-t', '..' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no connectable databases to check matching "\.\."/ ], + [qr/^$/], + [ + qr/pg_amcheck: error: no connectable databases to check matching "\.\."/ + ], 'checking table pattern ".."'); # Again, but with non-trivial schema and relation parts $node->command_checks_all( [ 'pg_amcheck', '-d', 'postgres', '-t', '.foo.bar' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no connectable databases to check matching "\.foo\.bar"/ ], + [qr/^$/], + [ + qr/pg_amcheck: error: no connectable databases to check matching "\.foo\.bar"/ + ], 'checking table pattern ".foo.bar"'); # Check two-part unreasonable pattern that has zero-length names $node->command_checks_all( [ 'pg_amcheck', '-d', 'postgres', '-t', '.' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: error: no heap tables to check matching "\."/ ], + [qr/^$/], + [qr/pg_amcheck: error: no heap tables to check matching "\."/], 'checking table pattern "."'); ######################################### @@ -137,73 +153,80 @@ $node->command_checks_all( # Use --no-strict-names and a single existent table so we only get warnings # about the failed pattern matches $node->command_checks_all( - [ 'pg_amcheck', '--no-strict-names', - '-t', 'no_such_table', - '-t', 'no*such*table', - '-i', 'no_such_index', - '-i', 'no*such*index', - '-r', 'no_such_relation', - '-r', 'no*such*relation', - '-d', 'no_such_database', - '-d', 'no*such*database', - '-r', 'none.none', - '-r', 'none.none.none', - '-r', 'this.is.a.really.long.dotted.string', - '-r', 'postgres.none.none', - '-r', 'postgres.long.dotted.string', - '-r', 'postgres.pg_catalog.none', - '-r', 'postgres.none.pg_class', - '-t', 'postgres.pg_catalog.pg_class', # This exists + [ + 'pg_amcheck', '--no-strict-names', + '-t', 'no_such_table', + '-t', 'no*such*table', + '-i', 'no_such_index', + '-i', 'no*such*index', + '-r', 'no_such_relation', + '-r', 'no*such*relation', + '-d', 'no_such_database', + '-d', 'no*such*database', + '-r', 'none.none', + '-r', 'none.none.none', + '-r', 'this.is.a.really.long.dotted.string', + '-r', 'postgres.none.none', + '-r', 'postgres.long.dotted.string', + '-r', 'postgres.pg_catalog.none', + '-r', 'postgres.none.pg_class', + '-t', 'postgres.pg_catalog.pg_class', # This exists ], 0, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: no heap tables to check matching "no_such_table"/, - qr/pg_amcheck: warning: no heap tables to check matching "no\*such\*table"/, - qr/pg_amcheck: warning: no btree indexes to check matching "no_such_index"/, - qr/pg_amcheck: warning: no btree indexes to check matching "no\*such\*index"/, - qr/pg_amcheck: warning: no relations to check matching "no_such_relation"/, - qr/pg_amcheck: warning: no relations to check matching "no\*such\*relation"/, - qr/pg_amcheck: warning: no heap tables to check matching "no\*such\*table"/, - qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database"/, - qr/pg_amcheck: warning: no connectable databases to check matching "no\*such\*database"/, - qr/pg_amcheck: warning: no relations to check matching "none\.none"/, - qr/pg_amcheck: warning: no connectable databases to check matching "none\.none\.none"/, - qr/pg_amcheck: warning: no connectable databases to check matching "this\.is\.a\.really\.long\.dotted\.string"/, - qr/pg_amcheck: warning: no relations to check matching "postgres\.none\.none"/, - qr/pg_amcheck: warning: no relations to check matching "postgres\.long\.dotted\.string"/, - qr/pg_amcheck: warning: no relations to check matching "postgres\.pg_catalog\.none"/, - qr/pg_amcheck: warning: no relations to check matching "postgres\.none\.pg_class"/, + [qr/^$/], + [ + qr/pg_amcheck: warning: no heap tables to check matching "no_such_table"/, + qr/pg_amcheck: warning: no heap tables to check matching "no\*such\*table"/, + qr/pg_amcheck: warning: no btree indexes to check matching "no_such_index"/, + qr/pg_amcheck: warning: no btree indexes to check matching "no\*such\*index"/, + qr/pg_amcheck: warning: no relations to check matching "no_such_relation"/, + qr/pg_amcheck: warning: no relations to check matching "no\*such\*relation"/, + qr/pg_amcheck: warning: no heap tables to check matching "no\*such\*table"/, + qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database"/, + qr/pg_amcheck: warning: no connectable databases to check matching "no\*such\*database"/, + qr/pg_amcheck: warning: no relations to check matching "none\.none"/, + qr/pg_amcheck: warning: no connectable databases to check matching "none\.none\.none"/, + qr/pg_amcheck: warning: no connectable databases to check matching "this\.is\.a\.really\.long\.dotted\.string"/, + qr/pg_amcheck: warning: no relations to check matching "postgres\.none\.none"/, + qr/pg_amcheck: warning: no relations to check matching "postgres\.long\.dotted\.string"/, + qr/pg_amcheck: warning: no relations to check matching "postgres\.pg_catalog\.none"/, + qr/pg_amcheck: warning: no relations to check matching "postgres\.none\.pg_class"/, ], - 'many unmatched patterns and one matched pattern under --no-strict-names'); + 'many unmatched patterns and one matched pattern under --no-strict-names' +); ######################################### # Test checking otherwise existent objects but in databases where they do not exist -$node->safe_psql('postgres', q( +$node->safe_psql( + 'postgres', q( CREATE TABLE public.foo (f integer); CREATE INDEX foo_idx ON foo(f); )); $node->safe_psql('postgres', q(CREATE DATABASE another_db)); $node->command_checks_all( - [ 'pg_amcheck', '-d', 'postgres', '--no-strict-names', - '-t', 'template1.public.foo', - '-t', 'another_db.public.foo', - '-t', 'no_such_database.public.foo', - '-i', 'template1.public.foo_idx', - '-i', 'another_db.public.foo_idx', - '-i', 'no_such_database.public.foo_idx', + [ + 'pg_amcheck', '-d', + 'postgres', '--no-strict-names', + '-t', 'template1.public.foo', + '-t', 'another_db.public.foo', + '-t', 'no_such_database.public.foo', + '-i', 'template1.public.foo_idx', + '-i', 'another_db.public.foo_idx', + '-i', 'no_such_database.public.foo_idx', ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, - qr/pg_amcheck: warning: no heap tables to check matching "template1\.public\.foo"/, - qr/pg_amcheck: warning: no heap tables to check matching "another_db\.public\.foo"/, - qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database\.public\.foo"/, - qr/pg_amcheck: warning: no btree indexes to check matching "template1\.public\.foo_idx"/, - qr/pg_amcheck: warning: no btree indexes to check matching "another_db\.public\.foo_idx"/, - qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database\.public\.foo_idx"/, - qr/pg_amcheck: error: no relations to check/, + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, + qr/pg_amcheck: warning: no heap tables to check matching "template1\.public\.foo"/, + qr/pg_amcheck: warning: no heap tables to check matching "another_db\.public\.foo"/, + qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database\.public\.foo"/, + qr/pg_amcheck: warning: no btree indexes to check matching "template1\.public\.foo_idx"/, + qr/pg_amcheck: warning: no btree indexes to check matching "another_db\.public\.foo_idx"/, + qr/pg_amcheck: warning: no connectable databases to check matching "no_such_database\.public\.foo_idx"/, + qr/pg_amcheck: error: no relations to check/, ], 'checking otherwise existent objets in the wrong databases'); @@ -213,30 +236,31 @@ $node->command_checks_all( # Check with only schema exclusion patterns $node->command_checks_all( - [ 'pg_amcheck', '--all', '--no-strict-names', - '-S', 'public', - '-S', 'pg_catalog', - '-S', 'pg_toast', - '-S', 'information_schema', + [ + 'pg_amcheck', '--all', '--no-strict-names', '-S', + 'public', '-S', 'pg_catalog', '-S', + 'pg_toast', '-S', 'information_schema', ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, - qr/pg_amcheck: error: no relations to check/ ], + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, + qr/pg_amcheck: error: no relations to check/ + ], 'schema exclusion patterns exclude all relations'); # Check with schema exclusion patterns overriding relation and schema inclusion patterns $node->command_checks_all( - [ 'pg_amcheck', '--all', '--no-strict-names', - '-s', 'public', - '-s', 'pg_catalog', - '-s', 'pg_toast', - '-s', 'information_schema', - '-t', 'pg_catalog.pg_class', - '-S*' + [ + 'pg_amcheck', '--all', '--no-strict-names', '-s', + 'public', '-s', 'pg_catalog', '-s', + 'pg_toast', '-s', 'information_schema', '-t', + 'pg_catalog.pg_class', '-S*' ], 1, - [ qr/^$/ ], - [ qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, - qr/pg_amcheck: error: no relations to check/ ], + [qr/^$/], + [ + qr/pg_amcheck: warning: skipping database "template1": amcheck is not installed/, + qr/pg_amcheck: error: no relations to check/ + ], 'schema exclusion pattern overrides all inclusion patterns'); diff --git a/src/bin/pg_amcheck/t/003_check.pl b/src/bin/pg_amcheck/t/003_check.pl index 659fd15983..817eb4e116 100644 --- a/src/bin/pg_amcheck/t/003_check.pl +++ b/src/bin/pg_amcheck/t/003_check.pl @@ -20,8 +20,8 @@ sub relation_filepath my ($dbname, $relname) = @_; my $pgdata = $node->data_dir; - my $rel = $node->safe_psql($dbname, - qq(SELECT pg_relation_filepath('$relname'))); + my $rel = + $node->safe_psql($dbname, qq(SELECT pg_relation_filepath('$relname'))); die "path not found for relation $relname" unless defined $rel; return "$pgdata/$rel"; } @@ -33,7 +33,8 @@ sub relation_toast { my ($dbname, $relname) = @_; - my $rel = $node->safe_psql($dbname, qq( + my $rel = $node->safe_psql( + $dbname, qq( SELECT c.reltoastrelid::regclass FROM pg_catalog.pg_class c WHERE c.oid = '$relname'::regclass @@ -83,23 +84,22 @@ sub corrupt_first_page my $fh; open($fh, '+<', $relpath) - or BAIL_OUT("open failed: $!"); + or BAIL_OUT("open failed: $!"); binmode $fh; # Corrupt some line pointers. The values are chosen to hit the # various line-pointer-corruption checks in verify_heapam.c # on both little-endian and big-endian architectures. seek($fh, 32, SEEK_SET) - or BAIL_OUT("seek failed: $!"); + or BAIL_OUT("seek failed: $!"); syswrite( $fh, pack("L*", - 0xAAA15550, 0xAAA0D550, 0x00010000, - 0x00008000, 0x0000800F, 0x001e8000, - 0xFFFFFFFF) + 0xAAA15550, 0xAAA0D550, 0x00010000, 0x00008000, + 0x0000800F, 0x001e8000, 0xFFFFFFFF) ) or BAIL_OUT("syswrite failed: $!"); close($fh) - or BAIL_OUT("close failed: $!"); + or BAIL_OUT("close failed: $!"); } # Stops the node, performs all the corruptions previously planned, and @@ -137,7 +137,8 @@ for my $dbname (qw(db1 db2 db3)) # check that pg_amcheck does not get confused by them. Create functions in # schema public that look like amcheck functions to check that pg_amcheck # does not use them. - $node->safe_psql($dbname, q( + $node->safe_psql( + $dbname, q( CREATE SCHEMA amcheck_schema; CREATE EXTENSION amcheck WITH SCHEMA amcheck_schema; CREATE TABLE amcheck_schema.pg_database (junk text); @@ -187,7 +188,8 @@ for my $dbname (qw(db1 db2 db3)) # for my $schema (qw(s1 s2 s3 s4 s5)) { - $node->safe_psql($dbname, qq( + $node->safe_psql( + $dbname, qq( CREATE SCHEMA $schema; CREATE SEQUENCE $schema.seq1; CREATE SEQUENCE $schema.seq2; @@ -318,21 +320,18 @@ plan_to_remove_relation_file('db2', 's1.t1_btree'); my @cmd = ('pg_amcheck', '--quiet', '-p', $port); # Regular expressions to match various expected output -my $no_output_re = qr/^$/; +my $no_output_re = qr/^$/; my $line_pointer_corruption_re = qr/line pointer/; my $missing_file_re = qr/could not open file ".*": No such file or directory/; -my $index_missing_relation_fork_re = qr/index ".*" lacks a main relation fork/; +my $index_missing_relation_fork_re = + qr/index ".*" lacks a main relation fork/; # We have created test databases with tables populated with data, but have not # yet corrupted anything. As such, we expect no corruption and verify that # none is reported # -$node->command_checks_all( - [ @cmd, '-d', 'db1', '-d', 'db2', '-d', 'db3' ], - 0, - [ $no_output_re ], - [ $no_output_re ], - 'pg_amcheck prior to corruption'); +$node->command_checks_all([ @cmd, '-d', 'db1', '-d', 'db2', '-d', 'db3' ], + 0, [$no_output_re], [$no_output_re], 'pg_amcheck prior to corruption'); # Perform the corruptions we planned above using only a single database restart. # @@ -347,22 +346,23 @@ perform_all_corruptions(); $node->command_checks_all( [ @cmd, 'db1' ], 2, - [ $index_missing_relation_fork_re, - $line_pointer_corruption_re, - $missing_file_re, + [ + $index_missing_relation_fork_re, $line_pointer_corruption_re, + $missing_file_re, ], - [ $no_output_re ], + [$no_output_re], 'pg_amcheck all schemas, tables and indexes in database db1'); $node->command_checks_all( [ @cmd, '-d', 'db1', '-d', 'db2', '-d', 'db3' ], 2, - [ $index_missing_relation_fork_re, - $line_pointer_corruption_re, - $missing_file_re, + [ + $index_missing_relation_fork_re, $line_pointer_corruption_re, + $missing_file_re, ], - [ $no_output_re ], - 'pg_amcheck all schemas, tables and indexes in databases db1, db2, and db3'); + [$no_output_re], + 'pg_amcheck all schemas, tables and indexes in databases db1, db2, and db3' +); # Scans of indexes in s1 should detect the specific corruption that we created # above. For missing relation forks, we know what the error message looks @@ -376,15 +376,17 @@ $node->command_checks_all( $node->command_checks_all( [ @cmd, '--all', '-s', 's1', '-i', 't1_btree' ], 2, - [ $index_missing_relation_fork_re ], - [ qr/pg_amcheck: warning: skipping database "postgres": amcheck is not installed/ ], + [$index_missing_relation_fork_re], + [ + qr/pg_amcheck: warning: skipping database "postgres": amcheck is not installed/ + ], 'pg_amcheck index s1.t1_btree reports missing main relation fork'); $node->command_checks_all( [ @cmd, '-d', 'db1', '-s', 's1', '-i', 't2_btree' ], 2, - [ qr/.+/ ], # Any non-empty error message is acceptable - [ $no_output_re ], + [qr/.+/], # Any non-empty error message is acceptable + [$no_output_re], 'pg_amcheck index s1.s2 reports index corruption'); # Checking db1.s1 with indexes excluded should show no corruptions because we @@ -393,18 +395,14 @@ $node->command_checks_all( # $node->command_checks_all( [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db1' ], - 0, - [ $no_output_re ], - [ $no_output_re ], + 0, [$no_output_re], [$no_output_re], 'pg_amcheck of db1.s1 excluding indexes'); # Checking db2.s1 should show table corruptions if indexes are excluded # $node->command_checks_all( [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db2' ], - 2, - [ $missing_file_re ], - [ $no_output_re ], + 2, [$missing_file_re], [$no_output_re], 'pg_amcheck of db2.s1 excluding indexes'); # In schema db1.s3, the tables and indexes are both corrupt. We should see @@ -413,36 +411,33 @@ $node->command_checks_all( $node->command_checks_all( [ @cmd, '-s', 's3', 'db1' ], 2, - [ $index_missing_relation_fork_re, - $line_pointer_corruption_re, - $missing_file_re, + [ + $index_missing_relation_fork_re, $line_pointer_corruption_re, + $missing_file_re, ], - [ $no_output_re ], + [$no_output_re], 'pg_amcheck schema s3 reports table and index errors'); # In schema db1.s4, only toast tables are corrupt. Check that under default # options the toast corruption is reported, but when excluding toast we get no # error reports. -$node->command_checks_all( - [ @cmd, '-s', 's4', 'db1' ], - 2, - [ $missing_file_re ], - [ $no_output_re ], +$node->command_checks_all([ @cmd, '-s', 's4', 'db1' ], + 2, [$missing_file_re], [$no_output_re], 'pg_amcheck in schema s4 reports toast corruption'); $node->command_checks_all( - [ @cmd, '--no-dependent-toast', '--exclude-toast-pointers', '-s', 's4', 'db1' ], + [ + @cmd, '--no-dependent-toast', '--exclude-toast-pointers', '-s', 's4', + 'db1' + ], 0, - [ $no_output_re ], - [ $no_output_re ], + [$no_output_re], + [$no_output_re], 'pg_amcheck in schema s4 excluding toast reports no corruption'); # Check that no corruption is reported in schema db1.s5 -$node->command_checks_all( - [ @cmd, '-s', 's5', 'db1' ], - 0, - [ $no_output_re ], - [ $no_output_re ], +$node->command_checks_all([ @cmd, '-s', 's5', 'db1' ], + 0, [$no_output_re], [$no_output_re], 'pg_amcheck over schema s5 reports no corruption'); # In schema db1.s1, only indexes are corrupt. Verify that when we exclude @@ -451,9 +446,10 @@ $node->command_checks_all( $node->command_checks_all( [ @cmd, '-s', 's1', '-I', 't1_btree', '-I', 't2_btree', 'db1' ], 0, - [ $no_output_re ], - [ $no_output_re ], - 'pg_amcheck over schema s1 with corrupt indexes excluded reports no corruption'); + [$no_output_re], + [$no_output_re], + 'pg_amcheck over schema s1 with corrupt indexes excluded reports no corruption' +); # In schema db1.s1, only indexes are corrupt. Verify that when we provide only # table inclusions, and disable index expansion, no corruption is reported @@ -462,9 +458,10 @@ $node->command_checks_all( $node->command_checks_all( [ @cmd, '-t', 's1.*', '--no-dependent-indexes', 'db1' ], 0, - [ $no_output_re ], - [ $no_output_re ], - 'pg_amcheck over schema s1 with all indexes excluded reports no corruption'); + [$no_output_re], + [$no_output_re], + 'pg_amcheck over schema s1 with all indexes excluded reports no corruption' +); # In schema db1.s2, only tables are corrupt. Verify that when we exclude those # tables that no corruption is reported. @@ -472,9 +469,10 @@ $node->command_checks_all( $node->command_checks_all( [ @cmd, '-s', 's2', '-T', 't1', '-T', 't2', 'db1' ], 0, - [ $no_output_re ], - [ $no_output_re ], - 'pg_amcheck over schema s2 with corrupt tables excluded reports no corruption'); + [$no_output_re], + [$no_output_re], + 'pg_amcheck over schema s2 with corrupt tables excluded reports no corruption' +); # Check errors about bad block range command line arguments. We use schema s5 # to avoid getting messages about corrupt tables or indexes. @@ -501,20 +499,21 @@ command_fails_like( $node->command_checks_all( [ @cmd, '-s', 's1', '-i', 't1_btree', '--parent-check', 'db1' ], 2, - [ $index_missing_relation_fork_re ], - [ $no_output_re ], + [$index_missing_relation_fork_re], + [$no_output_re], 'pg_amcheck smoke test --parent-check'); $node->command_checks_all( - [ @cmd, '-s', 's1', '-i', 't1_btree', '--heapallindexed', '--rootdescend', 'db1' ], + [ + @cmd, '-s', 's1', '-i', 't1_btree', '--heapallindexed', + '--rootdescend', 'db1' + ], 2, - [ $index_missing_relation_fork_re ], - [ $no_output_re ], + [$index_missing_relation_fork_re], + [$no_output_re], 'pg_amcheck smoke test --heapallindexed --rootdescend'); $node->command_checks_all( [ @cmd, '-d', 'db1', '-d', 'db2', '-d', 'db3', '-S', 's*' ], - 0, - [ $no_output_re ], - [ $no_output_re ], + 0, [$no_output_re], [$no_output_re], 'pg_amcheck excluding all corrupt schemas'); diff --git a/src/bin/pg_amcheck/t/004_verify_heapam.pl b/src/bin/pg_amcheck/t/004_verify_heapam.pl index fa4059172e..b3a96e8016 100644 --- a/src/bin/pg_amcheck/t/004_verify_heapam.pl +++ b/src/bin/pg_amcheck/t/004_verify_heapam.pl @@ -85,7 +85,7 @@ use Test::More; # constants here, where they can be compared easily against the layout. use constant HEAPTUPLE_PACK_CODE => 'LLLSSSSSCCLLCCCCCCCCCCllLL'; -use constant HEAPTUPLE_PACK_LENGTH => 58; # Total size +use constant HEAPTUPLE_PACK_LENGTH => 58; # Total size # Read a tuple of our table from a heap page. # @@ -100,39 +100,40 @@ sub read_tuple my ($fh, $offset) = @_; my ($buffer, %tup); seek($fh, $offset, SEEK_SET) - or BAIL_OUT("seek failed: $!"); + or BAIL_OUT("seek failed: $!"); defined(sysread($fh, $buffer, HEAPTUPLE_PACK_LENGTH)) - or BAIL_OUT("sysread failed: $!"); + or BAIL_OUT("sysread failed: $!"); @_ = unpack(HEAPTUPLE_PACK_CODE, $buffer); - %tup = (t_xmin => shift, - t_xmax => shift, - t_field3 => shift, - bi_hi => shift, - bi_lo => shift, - ip_posid => shift, - t_infomask2 => shift, - t_infomask => shift, - t_hoff => shift, - t_bits => shift, - a_1 => shift, - a_2 => shift, - b_header => shift, - b_body1 => shift, - b_body2 => shift, - b_body3 => shift, - b_body4 => shift, - b_body5 => shift, - b_body6 => shift, - b_body7 => shift, - c_va_header => shift, - c_va_vartag => shift, - c_va_rawsize => shift, - c_va_extinfo => shift, - c_va_valueid => shift, - c_va_toastrelid => shift); + %tup = ( + t_xmin => shift, + t_xmax => shift, + t_field3 => shift, + bi_hi => shift, + bi_lo => shift, + ip_posid => shift, + t_infomask2 => shift, + t_infomask => shift, + t_hoff => shift, + t_bits => shift, + a_1 => shift, + a_2 => shift, + b_header => shift, + b_body1 => shift, + b_body2 => shift, + b_body3 => shift, + b_body4 => shift, + b_body5 => shift, + b_body6 => shift, + b_body7 => shift, + c_va_header => shift, + c_va_vartag => shift, + c_va_rawsize => shift, + c_va_extinfo => shift, + c_va_valueid => shift, + c_va_toastrelid => shift); # Stitch together the text for column 'b' - $tup{b} = join('', map { chr($tup{"b_body$_"}) } (1..7)); + $tup{b} = join('', map { chr($tup{"b_body$_"}) } (1 .. 7)); return \%tup; } @@ -149,37 +150,25 @@ sub read_tuple sub write_tuple { my ($fh, $offset, $tup) = @_; - my $buffer = pack(HEAPTUPLE_PACK_CODE, - $tup->{t_xmin}, - $tup->{t_xmax}, - $tup->{t_field3}, - $tup->{bi_hi}, - $tup->{bi_lo}, - $tup->{ip_posid}, - $tup->{t_infomask2}, - $tup->{t_infomask}, - $tup->{t_hoff}, - $tup->{t_bits}, - $tup->{a_1}, - $tup->{a_2}, - $tup->{b_header}, - $tup->{b_body1}, - $tup->{b_body2}, - $tup->{b_body3}, - $tup->{b_body4}, - $tup->{b_body5}, - $tup->{b_body6}, - $tup->{b_body7}, - $tup->{c_va_header}, - $tup->{c_va_vartag}, - $tup->{c_va_rawsize}, - $tup->{c_va_extinfo}, - $tup->{c_va_valueid}, - $tup->{c_va_toastrelid}); + my $buffer = pack( + HEAPTUPLE_PACK_CODE, + $tup->{t_xmin}, $tup->{t_xmax}, + $tup->{t_field3}, $tup->{bi_hi}, + $tup->{bi_lo}, $tup->{ip_posid}, + $tup->{t_infomask2}, $tup->{t_infomask}, + $tup->{t_hoff}, $tup->{t_bits}, + $tup->{a_1}, $tup->{a_2}, + $tup->{b_header}, $tup->{b_body1}, + $tup->{b_body2}, $tup->{b_body3}, + $tup->{b_body4}, $tup->{b_body5}, + $tup->{b_body6}, $tup->{b_body7}, + $tup->{c_va_header}, $tup->{c_va_vartag}, + $tup->{c_va_rawsize}, $tup->{c_va_extinfo}, + $tup->{c_va_valueid}, $tup->{c_va_toastrelid}); seek($fh, $offset, SEEK_SET) - or BAIL_OUT("seek failed: $!"); + or BAIL_OUT("seek failed: $!"); defined(syswrite($fh, $buffer, HEAPTUPLE_PACK_LENGTH)) - or BAIL_OUT("syswrite failed: $!"); + or BAIL_OUT("syswrite failed: $!"); return; } @@ -196,7 +185,7 @@ $node->append_conf('postgresql.conf', 'autovacuum=off'); # Start the node and load the extensions. We depend on both # amcheck and pageinspect for this test. $node->start; -my $port = $node->port; +my $port = $node->port; my $pgdata = $node->data_dir; $node->safe_psql('postgres', "CREATE EXTENSION amcheck"); $node->safe_psql('postgres', "CREATE EXTENSION pageinspect"); @@ -224,12 +213,14 @@ $node->safe_psql( VACUUM FREEZE public.junk )); -my $rel = $node->safe_psql('postgres', qq(SELECT pg_relation_filepath('public.test'))); +my $rel = $node->safe_psql('postgres', + qq(SELECT pg_relation_filepath('public.test'))); my $relpath = "$pgdata/$rel"; # Insert data and freeze public.test use constant ROWCOUNT => 16; -$node->safe_psql('postgres', qq( +$node->safe_psql( + 'postgres', qq( INSERT INTO public.test (a, b, c) VALUES ( x'DEADF9F9DEADF9F9'::bigint, @@ -237,7 +228,7 @@ $node->safe_psql('postgres', qq( repeat('w', 10000) ); VACUUM FREEZE public.test - )) for (1..ROWCOUNT); + )) for (1 .. ROWCOUNT); my $relfrozenxid = $node->safe_psql('postgres', q(select relfrozenxid from pg_class where relname = 'test')); @@ -250,15 +241,19 @@ my $datfrozenxid = $node->safe_psql('postgres', if ($datfrozenxid <= 3 || $datfrozenxid >= $relfrozenxid) { $node->clean_node; - plan skip_all => "Xid thresholds not as expected: got datfrozenxid = $datfrozenxid, relfrozenxid = $relfrozenxid"; + plan skip_all => + "Xid thresholds not as expected: got datfrozenxid = $datfrozenxid, relfrozenxid = $relfrozenxid"; exit; } # Find where each of the tuples is located on the page. my @lp_off; -for my $tup (0..ROWCOUNT-1) +for my $tup (0 .. ROWCOUNT - 1) { - push (@lp_off, $node->safe_psql('postgres', qq( + push( + @lp_off, + $node->safe_psql( + 'postgres', qq( select lp_off from heap_page_items(get_raw_page('test', 'main', 0)) offset $tup limit 1))); } @@ -269,26 +264,28 @@ select lp_off from heap_page_items(get_raw_page('test', 'main', 0)) $node->stop; my $file; open($file, '+<', $relpath) - or BAIL_OUT("open failed: $!"); + or BAIL_OUT("open failed: $!"); binmode $file; my $ENDIANNESS; for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) { - my $offnum = $tupidx + 1; # offnum is 1-based, not zero-based + my $offnum = $tupidx + 1; # offnum is 1-based, not zero-based my $offset = $lp_off[$tupidx]; my $tup = read_tuple($file, $offset); # Sanity-check that the data appears on the page where we expect. my $a_1 = $tup->{a_1}; my $a_2 = $tup->{a_2}; - my $b = $tup->{b}; + my $b = $tup->{b}; if ($a_1 != 0xDEADF9F9 || $a_2 != 0xDEADF9F9 || $b ne 'abcdefg') { - close($file); # ignore errors on close; we're exiting anyway + close($file); # ignore errors on close; we're exiting anyway $node->clean_node; - plan skip_all => sprintf("Page layout differs from our expectations: expected (%x, %x, \"%s\"), got (%x, %x, \"%s\")", - 0xDEADF9F9, 0xDEADF9F9, "abcdefg", $a_1, $a_2, $b); + plan skip_all => + sprintf( + "Page layout differs from our expectations: expected (%x, %x, \"%s\"), got (%x, %x, \"%s\")", + 0xDEADF9F9, 0xDEADF9F9, "abcdefg", $a_1, $a_2, $b); exit; } @@ -296,44 +293,47 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $ENDIANNESS = $tup->{b_header} == 0x11 ? "little" : "big"; } close($file) - or BAIL_OUT("close failed: $!"); + or BAIL_OUT("close failed: $!"); $node->start; # Ok, Xids and page layout look ok. We can run corruption tests. plan tests => 19; # Check that pg_amcheck runs against the uncorrupted table without error. -$node->command_ok(['pg_amcheck', '-p', $port, 'postgres'], - 'pg_amcheck test table, prior to corruption'); +$node->command_ok( + [ 'pg_amcheck', '-p', $port, 'postgres' ], + 'pg_amcheck test table, prior to corruption'); # Check that pg_amcheck runs against the uncorrupted table and index without error. -$node->command_ok(['pg_amcheck', '-p', $port, 'postgres'], - 'pg_amcheck test table and index, prior to corruption'); +$node->command_ok([ 'pg_amcheck', '-p', $port, 'postgres' ], + 'pg_amcheck test table and index, prior to corruption'); $node->stop; # Some #define constants from access/htup_details.h for use while corrupting. -use constant HEAP_HASNULL => 0x0001; -use constant HEAP_XMAX_LOCK_ONLY => 0x0080; -use constant HEAP_XMIN_COMMITTED => 0x0100; -use constant HEAP_XMIN_INVALID => 0x0200; -use constant HEAP_XMAX_COMMITTED => 0x0400; -use constant HEAP_XMAX_INVALID => 0x0800; -use constant HEAP_NATTS_MASK => 0x07FF; -use constant HEAP_XMAX_IS_MULTI => 0x1000; -use constant HEAP_KEYS_UPDATED => 0x2000; +use constant HEAP_HASNULL => 0x0001; +use constant HEAP_XMAX_LOCK_ONLY => 0x0080; +use constant HEAP_XMIN_COMMITTED => 0x0100; +use constant HEAP_XMIN_INVALID => 0x0200; +use constant HEAP_XMAX_COMMITTED => 0x0400; +use constant HEAP_XMAX_INVALID => 0x0800; +use constant HEAP_NATTS_MASK => 0x07FF; +use constant HEAP_XMAX_IS_MULTI => 0x1000; +use constant HEAP_KEYS_UPDATED => 0x2000; # Helper function to generate a regular expression matching the header we # expect verify_heapam() to return given which fields we expect to be non-null. sub header { my ($blkno, $offnum, $attnum) = @_; - return qr/heap table "postgres"\."public"\."test", block $blkno, offset $offnum, attribute $attnum:\s+/ms - if (defined $attnum); - return qr/heap table "postgres"\."public"\."test", block $blkno, offset $offnum:\s+/ms - if (defined $offnum); + return + qr/heap table "postgres"\."public"\."test", block $blkno, offset $offnum, attribute $attnum:\s+/ms + if (defined $attnum); + return + qr/heap table "postgres"\."public"\."test", block $blkno, offset $offnum:\s+/ms + if (defined $offnum); return qr/heap table "postgres"\."public"\."test", block $blkno:\s+/ms - if (defined $blkno); + if (defined $blkno); return qr/heap table "postgres"\."public"\."test":\s+/ms; } @@ -344,12 +344,12 @@ sub header # my @expected; open($file, '+<', $relpath) - or BAIL_OUT("open failed: $!"); + or BAIL_OUT("open failed: $!"); binmode $file; for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) { - my $offnum = $tupidx + 1; # offnum is 1-based, not zero-based + my $offnum = $tupidx + 1; # offnum is 1-based, not zero-based my $offset = $lp_off[$tupidx]; my $tup = read_tuple($file, $offset); @@ -364,7 +364,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) # Expected corruption report push @expected, - qr/${header}xmin $xmin precedes relation freeze threshold 0:\d+/; + qr/${header}xmin $xmin precedes relation freeze threshold 0:\d+/; } if ($offnum == 2) { @@ -375,7 +375,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_infomask} &= ~HEAP_XMIN_INVALID; push @expected, - qr/${$header}xmin $xmin precedes oldest valid transaction ID 0:\d+/; + qr/${$header}xmin $xmin precedes oldest valid transaction ID 0:\d+/; } elsif ($offnum == 3) { @@ -387,7 +387,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_infomask} &= ~HEAP_XMIN_INVALID; push @expected, - qr/${$header}xmin 4026531839 equals or exceeds next valid transaction ID 0:\d+/; + qr/${$header}xmin 4026531839 equals or exceeds next valid transaction ID 0:\d+/; } elsif ($offnum == 4) { @@ -396,7 +396,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_infomask} &= ~HEAP_XMAX_INVALID; push @expected, - qr/${$header}xmax 4026531839 equals or exceeds next valid transaction ID 0:\d+/; + qr/${$header}xmax 4026531839 equals or exceeds next valid transaction ID 0:\d+/; } elsif ($offnum == 5) { @@ -404,8 +404,8 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_hoff} += 128; push @expected, - qr/${$header}data begins at offset 152 beyond the tuple length 58/, - qr/${$header}tuple data should begin at byte 24, but actually begins at byte 152 \(3 attributes, no nulls\)/; + qr/${$header}data begins at offset 152 beyond the tuple length 58/, + qr/${$header}tuple data should begin at byte 24, but actually begins at byte 152 \(3 attributes, no nulls\)/; } elsif ($offnum == 6) { @@ -413,7 +413,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_hoff} += 3; push @expected, - qr/${$header}tuple data should begin at byte 24, but actually begins at byte 27 \(3 attributes, no nulls\)/; + qr/${$header}tuple data should begin at byte 24, but actually begins at byte 27 \(3 attributes, no nulls\)/; } elsif ($offnum == 7) { @@ -421,7 +421,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_hoff} -= 8; push @expected, - qr/${$header}tuple data should begin at byte 24, but actually begins at byte 16 \(3 attributes, no nulls\)/; + qr/${$header}tuple data should begin at byte 24, but actually begins at byte 16 \(3 attributes, no nulls\)/; } elsif ($offnum == 8) { @@ -429,7 +429,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_hoff} -= 3; push @expected, - qr/${$header}tuple data should begin at byte 24, but actually begins at byte 21 \(3 attributes, no nulls\)/; + qr/${$header}tuple data should begin at byte 24, but actually begins at byte 21 \(3 attributes, no nulls\)/; } elsif ($offnum == 9) { @@ -437,30 +437,30 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_infomask2} |= HEAP_NATTS_MASK; push @expected, - qr/${$header}number of attributes 2047 exceeds maximum expected for table 3/; + qr/${$header}number of attributes 2047 exceeds maximum expected for table 3/; } elsif ($offnum == 10) { # Corrupt the tuple to look like it has lots of attributes, some of # them null. This falsely creates the impression that the t_bits # array is longer than just one byte, but t_hoff still says otherwise. - $tup->{t_infomask} |= HEAP_HASNULL; + $tup->{t_infomask} |= HEAP_HASNULL; $tup->{t_infomask2} |= HEAP_NATTS_MASK; $tup->{t_bits} = 0xAA; push @expected, - qr/${$header}tuple data should begin at byte 280, but actually begins at byte 24 \(2047 attributes, has nulls\)/; + qr/${$header}tuple data should begin at byte 280, but actually begins at byte 24 \(2047 attributes, has nulls\)/; } elsif ($offnum == 11) { # Same as above, but this time t_hoff plays along - $tup->{t_infomask} |= HEAP_HASNULL; + $tup->{t_infomask} |= HEAP_HASNULL; $tup->{t_infomask2} |= (HEAP_NATTS_MASK & 0x40); $tup->{t_bits} = 0xAA; $tup->{t_hoff} = 32; push @expected, - qr/${$header}number of attributes 67 exceeds maximum expected for table 3/; + qr/${$header}number of attributes 67 exceeds maximum expected for table 3/; } elsif ($offnum == 12) { @@ -478,13 +478,13 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) # bytes with 0xFF using 0x3FFFFFFF. # $tup->{b_header} = $ENDIANNESS eq 'little' ? 0xFC : 0x3F; - $tup->{b_body1} = 0xFF; - $tup->{b_body2} = 0xFF; - $tup->{b_body3} = 0xFF; + $tup->{b_body1} = 0xFF; + $tup->{b_body2} = 0xFF; + $tup->{b_body3} = 0xFF; $header = header(0, $offnum, 1); push @expected, - qr/${header}attribute with length \d+ ends at offset \d+ beyond total tuple length \d+/; + qr/${header}attribute with length \d+ ends at offset \d+ beyond total tuple length \d+/; } elsif ($offnum == 13) { @@ -492,8 +492,7 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{c_va_valueid} = 0xFFFFFFFF; $header = header(0, $offnum, 2); - push @expected, - qr/${header}toast value \d+ not found in toast table/; + push @expected, qr/${header}toast value \d+ not found in toast table/; } elsif ($offnum == 14) { @@ -503,9 +502,9 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_xmax} = 4; push @expected, - qr/${header}multitransaction ID 4 equals or exceeds next valid multitransaction ID 1/; + qr/${header}multitransaction ID 4 equals or exceeds next valid multitransaction ID 1/; } - elsif ($offnum == 15) # Last offnum must equal ROWCOUNT + elsif ($offnum == 15) # Last offnum must equal ROWCOUNT { # Set both HEAP_XMAX_COMMITTED and HEAP_XMAX_IS_MULTI $tup->{t_infomask} |= HEAP_XMAX_COMMITTED; @@ -513,22 +512,19 @@ for (my $tupidx = 0; $tupidx < ROWCOUNT; $tupidx++) $tup->{t_xmax} = 4000000000; push @expected, - qr/${header}multitransaction ID 4000000000 precedes relation minimum multitransaction ID threshold 1/; + qr/${header}multitransaction ID 4000000000 precedes relation minimum multitransaction ID threshold 1/; } write_tuple($file, $offset, $tup); } close($file) - or BAIL_OUT("close failed: $!"); + or BAIL_OUT("close failed: $!"); $node->start; # Run pg_amcheck against the corrupt table with epoch=0, comparing actual # corruption messages against the expected messages $node->command_checks_all( - ['pg_amcheck', '--no-dependent-indexes', '-p', $port, 'postgres'], - 2, - [ @expected ], - [ ], - 'Expected corruption message output'); + [ 'pg_amcheck', '--no-dependent-indexes', '-p', $port, 'postgres' ], + 2, [@expected], [], 'Expected corruption message output'); $node->teardown_node; $node->clean_node; diff --git a/src/bin/pg_amcheck/t/005_opclass_damage.pl b/src/bin/pg_amcheck/t/005_opclass_damage.pl index 062015aa00..b65becae9d 100644 --- a/src/bin/pg_amcheck/t/005_opclass_damage.pl +++ b/src/bin/pg_amcheck/t/005_opclass_damage.pl @@ -15,7 +15,8 @@ $node->init; $node->start; # Create a custom operator class and an index which uses it. -$node->safe_psql('postgres', q( +$node->safe_psql( + 'postgres', q( CREATE EXTENSION amcheck; CREATE FUNCTION int4_asc_cmp (a int4, b int4) RETURNS int LANGUAGE sql AS $$ @@ -39,7 +40,8 @@ $node->command_like( # Change the operator class to use a function which sorts in a different # order to corrupt the btree index -$node->safe_psql('postgres', q( +$node->safe_psql( + 'postgres', q( CREATE FUNCTION int4_desc_cmp (int4, int4) RETURNS int LANGUAGE sql AS $$ SELECT CASE WHEN $1 = $2 THEN 0 WHEN $1 > $2 THEN -1 ELSE 1 END; $$; UPDATE pg_catalog.pg_amproc @@ -51,7 +53,7 @@ $node->safe_psql('postgres', q( $node->command_checks_all( [ 'pg_amcheck', '-p', $node->port, 'postgres' ], 2, - [ qr/item order invariant violated for index "fickleidx"/ ], - [ ], + [qr/item order invariant violated for index "fickleidx"/], + [], 'pg_amcheck all schemas, tables and indexes reports fickleidx corruption' ); diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index 28949c9caf..74f8c2c739 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -554,7 +554,7 @@ my $file_corrupt2 = $node->safe_psql('postgres', # set page header and block sizes my $pageheader_size = 24; -my $block_size = $node->safe_psql('postgres', 'SHOW block_size;'); +my $block_size = $node->safe_psql('postgres', 'SHOW block_size;'); # induce corruption system_or_bail 'pg_ctl', '-D', $pgdata, 'stop'; diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 7fcd2014e7..1f24e79665 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -522,7 +522,7 @@ flagInhAttrs(DumpOptions *dopt, TableInfo *tblinfo, int numTables) { bool foundNotNull; /* Attr was NOT NULL in a parent */ bool foundDefault; /* Found a default in a parent */ - bool foundGenerated; /* Found a generated in a parent */ + bool foundGenerated; /* Found a generated in a parent */ /* no point in examining dropped columns */ if (tbinfo->attisdropped[j]) diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 2fdc0d341f..91060944f1 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -393,7 +393,8 @@ struct _tocEntry /* working state while dumping/restoring */ pgoff_t dataLength; /* item's data size; 0 if none or unknown */ - int reqs; /* do we need schema and/or data of object (REQ_* bit mask) */ + int reqs; /* do we need schema and/or data of object + * (REQ_* bit mask) */ bool created; /* set for DATA member if TABLE was created */ /* working state (needed only for parallel restore) */ @@ -443,7 +444,7 @@ extern void WriteDataChunksForTocEntry(ArchiveHandle *AH, TocEntry *te); extern ArchiveHandle *CloneArchive(ArchiveHandle *AH); extern void DeCloneArchive(ArchiveHandle *AH); -extern int TocIDRequired(ArchiveHandle *AH, DumpId id); +extern int TocIDRequired(ArchiveHandle *AH, DumpId id); TocEntry *getTocEntryByDumpId(ArchiveHandle *AH, DumpId id); extern bool checkSeek(FILE *fp); diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index b773ed0cb8..65bcb41a2f 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -1187,7 +1187,7 @@ _tarPositionTo(ArchiveHandle *AH, const char *filename) /* Header doesn't match, so read to next header */ len = th->fileLen; len += tarPaddingBytesRequired(th->fileLen); - blks = len / TAR_BLOCK_SIZE; /* # of tar blocks */ + blks = len / TAR_BLOCK_SIZE; /* # of tar blocks */ for (i = 0; i < blks; i++) _tarReadRaw(AH, &header[0], TAR_BLOCK_SIZE, NULL, ctx->tarFH); diff --git a/src/bin/pg_dump/t/010_dump_connstr.pl b/src/bin/pg_dump/t/010_dump_connstr.pl index 9a61eea060..6478894160 100644 --- a/src/bin/pg_dump/t/010_dump_connstr.pl +++ b/src/bin/pg_dump/t/010_dump_connstr.pl @@ -30,7 +30,7 @@ $ENV{PGCLIENTENCODING} = 'LATIN1'; # The odds of finding something interesting by testing all ASCII letters # seem too small to justify the cycles of testing a fifth name. my $dbname1 = - 'regression' + 'regression' . generate_ascii_string(1, 9) . generate_ascii_string(11, 12) . generate_ascii_string(14, 33) diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index 15a6f25ade..d636f35f5e 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -74,7 +74,8 @@ sub run_test primary_psql("VACUUM tail_tbl"); # Drop drop_tbl. pg_rewind should copy it back. - primary_psql("insert into drop_tbl values ('in primary, after promotion')"); + primary_psql( + "insert into drop_tbl values ('in primary, after promotion')"); primary_psql("DROP TABLE drop_tbl"); # Before running pg_rewind, do a couple of extra tests with several @@ -83,7 +84,7 @@ sub run_test # in "local" mode for simplicity's sake. if ($test_mode eq 'local') { - my $primary_pgdata = $node_primary->data_dir; + my $primary_pgdata = $node_primary->data_dir; my $standby_pgdata = $node_standby->data_dir; # First check that pg_rewind fails if the target cluster is diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl index 4fc500d4b4..672c5e586b 100644 --- a/src/bin/pg_rewind/t/003_extrafiles.pl +++ b/src/bin/pg_rewind/t/003_extrafiles.pl @@ -27,10 +27,13 @@ sub run_test # Create a subdir and files that will be present in both mkdir "$test_primary_datadir/tst_both_dir"; - append_to_file "$test_primary_datadir/tst_both_dir/both_file1", "in both1"; - append_to_file "$test_primary_datadir/tst_both_dir/both_file2", "in both2"; + append_to_file "$test_primary_datadir/tst_both_dir/both_file1", + "in both1"; + append_to_file "$test_primary_datadir/tst_both_dir/both_file2", + "in both2"; mkdir "$test_primary_datadir/tst_both_dir/both_subdir/"; - append_to_file "$test_primary_datadir/tst_both_dir/both_subdir/both_file3", + append_to_file + "$test_primary_datadir/tst_both_dir/both_subdir/both_file3", "in both3"; RewindTest::create_standby($test_mode); diff --git a/src/bin/pg_rewind/t/008_min_recovery_point.pl b/src/bin/pg_rewind/t/008_min_recovery_point.pl index 7d9362cc22..9ebcbad0d2 100644 --- a/src/bin/pg_rewind/t/008_min_recovery_point.pl +++ b/src/bin/pg_rewind/t/008_min_recovery_point.pl @@ -42,7 +42,8 @@ my $tmp_folder = TestLib::tempdir; my $node_1 = get_new_node('node_1'); $node_1->init(allows_streaming => 1); -$node_1->append_conf('postgresql.conf', qq( +$node_1->append_conf( + 'postgresql.conf', qq( wal_keep_size='100 MB' )); @@ -60,13 +61,11 @@ my $backup_name = 'my_backup'; $node_1->backup($backup_name); my $node_2 = get_new_node('node_2'); -$node_2->init_from_backup($node_1, $backup_name, - has_streaming => 1); +$node_2->init_from_backup($node_1, $backup_name, has_streaming => 1); $node_2->start; my $node_3 = get_new_node('node_3'); -$node_3->init_from_backup($node_1, $backup_name, - has_streaming => 1); +$node_3->init_from_backup($node_1, $backup_name, has_streaming => 1); $node_3->start; # Wait until node 3 has connected and caught up @@ -88,14 +87,16 @@ $node_3->safe_psql('postgres', "checkpoint"); # reconfigure node_1 as a standby following node_3 my $node_3_connstr = $node_3->connstr; -$node_1->append_conf('postgresql.conf', qq( +$node_1->append_conf( + 'postgresql.conf', qq( primary_conninfo='$node_3_connstr' )); $node_1->set_standby_mode(); $node_1->start(); # also reconfigure node_2 to follow node_3 -$node_2->append_conf('postgresql.conf', qq( +$node_2->append_conf( + 'postgresql.conf', qq( primary_conninfo='$node_3_connstr' )); $node_2->restart(); @@ -117,17 +118,21 @@ $node_1->safe_psql('postgres', "checkpoint"); # demonstratively create a split brain. After the rewind, we should only # see the insert on 1, as the insert on node 3 is rewound away. # -$node_1->safe_psql('postgres', "INSERT INTO public.foo (t) VALUES ('keep this')"); +$node_1->safe_psql('postgres', + "INSERT INTO public.foo (t) VALUES ('keep this')"); # 'bar' is unmodified in node 1, so it won't be overwritten by replaying the # WAL from node 1. -$node_3->safe_psql('postgres', "INSERT INTO public.bar (t) VALUES ('rewind this')"); +$node_3->safe_psql('postgres', + "INSERT INTO public.bar (t) VALUES ('rewind this')"); # Insert more rows in node 1, to bump up the XID counter. Otherwise, if # rewind doesn't correctly rewind the changes made on the other node, # we might fail to notice if the inserts are invisible because the XIDs # are not marked as committed. -$node_1->safe_psql('postgres', "INSERT INTO public.foo (t) VALUES ('and this')"); -$node_1->safe_psql('postgres', "INSERT INTO public.foo (t) VALUES ('and this too')"); +$node_1->safe_psql('postgres', + "INSERT INTO public.foo (t) VALUES ('and this')"); +$node_1->safe_psql('postgres', + "INSERT INTO public.foo (t) VALUES ('and this too')"); # Wait for node 2 to catch up $node_2->poll_query_until('postgres', @@ -138,7 +143,7 @@ $node_2->poll_query_until('postgres', $node_2->stop('fast'); $node_3->stop('fast'); -my $node_2_pgdata = $node_2->data_dir; +my $node_2_pgdata = $node_2->data_dir; my $node_1_connstr = $node_1->connstr; # Keep a temporary postgresql.conf or it would be overwritten during the rewind. @@ -147,12 +152,10 @@ copy( "$tmp_folder/node_2-postgresql.conf.tmp"); command_ok( - [ - 'pg_rewind', - "--source-server=$node_1_connstr", - "--target-pgdata=$node_2_pgdata", - "--debug" - ], + [ + 'pg_rewind', "--source-server=$node_1_connstr", + "--target-pgdata=$node_2_pgdata", "--debug" + ], 'run pg_rewind'); # Now move back postgresql.conf with old settings @@ -166,7 +169,7 @@ $node_2->start; # before rewind should've been overwritten with the data from node 1. my $result; $result = $node_2->safe_psql('postgres', 'SELECT * FROM public.foo'); -is($result, qq(keep this +is( $result, qq(keep this and this and this too), 'table foo after rewind'); diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 55a350af9d..938c661afc 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -223,7 +223,7 @@ sub promote_standby sub run_pg_rewind { my $test_mode = shift; - my $primary_pgdata = $node_primary->data_dir; + my $primary_pgdata = $node_primary->data_dir; my $standby_pgdata = $node_standby->data_dir; my $standby_connstr = $node_standby->connstr('postgres'); my $tmp_folder = TestLib::tempdir; @@ -286,8 +286,8 @@ sub run_pg_rewind # recovery configuration automatically. command_ok( [ - 'pg_rewind', "--debug", - "--source-server", $standby_connstr, + 'pg_rewind', "--debug", + "--source-server", $standby_connstr, "--target-pgdata=$primary_pgdata", "--no-sync", "--write-recovery-conf" ], diff --git a/src/bin/pg_test_fsync/pg_test_fsync.c b/src/bin/pg_test_fsync/pg_test_fsync.c index 29ee7c7d6f..78dab5096c 100644 --- a/src/bin/pg_test_fsync/pg_test_fsync.c +++ b/src/bin/pg_test_fsync/pg_test_fsync.c @@ -401,6 +401,7 @@ test_sync(int writes_per_op) buf, XLOG_BLCKSZ, writes * XLOG_BLCKSZ) != XLOG_BLCKSZ) + /* * This can generate write failures if the filesystem has * a large block size, e.g. 4k, and there is no support diff --git a/src/bin/pg_upgrade/check.c b/src/bin/pg_upgrade/check.c index 955a1533d0..0c47a6b8cc 100644 --- a/src/bin/pg_upgrade/check.c +++ b/src/bin/pg_upgrade/check.c @@ -486,8 +486,8 @@ check_databases_are_compatible(void) static void check_for_new_tablespace_dir(ClusterInfo *new_cluster) { - int tblnum; - char new_tablespace_dir[MAXPGPATH]; + int tblnum; + char new_tablespace_dir[MAXPGPATH]; prep_status("Checking for new cluster tablespace directories"); @@ -496,8 +496,8 @@ check_for_new_tablespace_dir(ClusterInfo *new_cluster) struct stat statbuf; snprintf(new_tablespace_dir, MAXPGPATH, "%s%s", - os_info.old_tablespaces[tblnum], - new_cluster->tablespace_suffix); + os_info.old_tablespaces[tblnum], + new_cluster->tablespace_suffix); if (stat(new_tablespace_dir, &statbuf) == 0 || errno != ENOENT) pg_fatal("new cluster tablespace directory already exists: \"%s\"\n", diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c index 9e52846ef8..19cc06e0c3 100644 --- a/src/bin/pg_upgrade/exec.c +++ b/src/bin/pg_upgrade/exec.c @@ -416,11 +416,11 @@ check_bin_dir(ClusterInfo *cluster, bool check_versions) static void check_exec(const char *dir, const char *program, bool check_version) { - char path[MAXPGPATH]; - char line[MAXPGPATH]; - char cmd[MAXPGPATH]; - char versionstr[128]; - int ret; + char path[MAXPGPATH]; + char line[MAXPGPATH]; + char cmd[MAXPGPATH]; + char versionstr[128]; + int ret; snprintf(path, sizeof(path), "%s/%s", dir, program); diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 0827665997..dc84b7b9b7 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -6577,8 +6577,8 @@ threadRun(void *arg) * GO before proceeding to the "done" path which will cleanup, * so as to avoid locking the process. * - * It is unclear whether it is worth doing anything rather than - * coldly exiting with an error message. + * It is unclear whether it is worth doing anything rather + * than coldly exiting with an error message. */ THREAD_BARRIER_WAIT(&barrier); goto done; diff --git a/src/bin/pgbench/t/001_pgbench_with_server.pl b/src/bin/pgbench/t/001_pgbench_with_server.pl index e1496bb213..2eaf9ab4c2 100644 --- a/src/bin/pgbench/t/001_pgbench_with_server.pl +++ b/src/bin/pgbench/t/001_pgbench_with_server.pl @@ -487,7 +487,7 @@ pgbench( qr{command=98.: int 5432\b}, # :random_seed qr{command=99.: int -9223372036854775808\b}, # min int qr{command=100.: int 9223372036854775807\b}, # max int - # pseudorandom permutation tests + # pseudorandom permutation tests qr{command=101.: boolean true\b}, qr{command=102.: boolean true\b}, qr{command=103.: boolean true\b}, @@ -1091,8 +1091,10 @@ SELECT LEAST(} . join(', ', (':i') x 256) . q{)} [qr{malformed variable.*trueXXX}], q{\set b :badtrue or true} ], [ - 'invalid permute size', 2, - [qr{permute size parameter must be greater than zero}], q{\set i permute(0, 0)} + 'invalid permute size', + 2, + [qr{permute size parameter must be greater than zero}], + q{\set i permute(0, 0)} ], # GSET diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index d917987fd5..51ae248ed8 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1788,14 +1788,14 @@ psql_completion(const char *text, int start, int end) /* ALTER INDEX SET|RESET ( */ else if (Matches("ALTER", "INDEX", MatchAny, "RESET", "(")) COMPLETE_WITH("fillfactor", - "deduplicate_items", /* BTREE */ + "deduplicate_items", /* BTREE */ "fastupdate", "gin_pending_list_limit", /* GIN */ "buffering", /* GiST */ "pages_per_range", "autosummarize" /* BRIN */ ); else if (Matches("ALTER", "INDEX", MatchAny, "SET", "(")) COMPLETE_WITH("fillfactor =", - "deduplicate_items =", /* BTREE */ + "deduplicate_items =", /* BTREE */ "fastupdate =", "gin_pending_list_limit =", /* GIN */ "buffering =", /* GiST */ "pages_per_range =", "autosummarize =" /* BRIN */ diff --git a/src/include/access/brin_tuple.h b/src/include/access/brin_tuple.h index 87de94f397..c80341f4d6 100644 --- a/src/include/access/brin_tuple.h +++ b/src/include/access/brin_tuple.h @@ -33,7 +33,7 @@ typedef struct BrinValues bool bv_allnulls; /* are all values nulls in the page range? */ Datum *bv_values; /* current accumulated values */ Datum bv_mem_value; /* expanded accumulated values */ - MemoryContext bv_context; + MemoryContext bv_context; brin_serialize_callback_type bv_serialize; } BrinValues; diff --git a/src/include/access/commit_ts.h b/src/include/access/commit_ts.h index 608a1643cd..e045dd416f 100644 --- a/src/include/access/commit_ts.h +++ b/src/include/access/commit_ts.h @@ -57,7 +57,7 @@ typedef struct xl_commit_ts_set RepOriginId nodeid; TransactionId mainxid; /* subxact Xids follow */ -} xl_commit_ts_set; +} xl_commit_ts_set; #define SizeOfCommitTsSet (offsetof(xl_commit_ts_set, mainxid) + \ sizeof(TransactionId)) diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h index a645c42e68..42c66fac57 100644 --- a/src/include/access/nbtree.h +++ b/src/include/access/nbtree.h @@ -1086,7 +1086,7 @@ typedef struct BTOptions { int32 varlena_header_; /* varlena header (do not touch directly!) */ int fillfactor; /* page fill factor in percent (0..100) */ - float8 vacuum_cleanup_index_scale_factor; /* deprecated */ + float8 vacuum_cleanup_index_scale_factor; /* deprecated */ bool deduplicate_items; /* Try to deduplicate items? */ } BTOptions; diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 17a161c69a..74a07ef152 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -93,7 +93,7 @@ typedef struct ParallelBlockTableScanWorkerData uint32 phsw_chunk_remaining; /* # blocks left in this chunk */ uint32 phsw_chunk_size; /* The number of blocks to allocate in * each I/O chunk for the scan */ -} ParallelBlockTableScanWorkerData; +} ParallelBlockTableScanWorkerData; typedef struct ParallelBlockTableScanWorkerData *ParallelBlockTableScanWorker; /* diff --git a/src/include/access/toast_compression.h b/src/include/access/toast_compression.h index 46c2544e31..9e2c1cbe1a 100644 --- a/src/include/access/toast_compression.h +++ b/src/include/access/toast_compression.h @@ -20,7 +20,7 @@ * but the value is one of the char values defined below, as they appear in * pg_attribute.attcompression, e.g. TOAST_PGLZ_COMPRESSION. */ -extern int default_toast_compression; +extern int default_toast_compression; /* * Built-in compression method-id. The toast compression header will store diff --git a/src/include/access/transam.h b/src/include/access/transam.h index 2f7338ee82..05c6fbffe4 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -238,7 +238,7 @@ typedef struct VariableCacheData * GetSnapshotData() needs to recompute the contents of the snapshot, or * not. There are likely other users of this. Always above 1. */ - uint64 xactCompletionCount; + uint64 xactCompletionCount; /* * These fields are protected by XactTruncationLock diff --git a/src/include/access/xact.h b/src/include/access/xact.h index f49a57b35e..134f6862da 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -72,8 +72,8 @@ typedef enum SYNCHRONOUS_COMMIT_REMOTE_WRITE, /* wait for local flush and remote * write */ SYNCHRONOUS_COMMIT_REMOTE_FLUSH, /* wait for local and remote flush */ - SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local and remote flush - and remote apply */ + SYNCHRONOUS_COMMIT_REMOTE_APPLY /* wait for local and remote flush and + * remote apply */ } SyncCommitLevel; /* Define the default setting for synchronous_commit */ diff --git a/src/include/catalog/pg_aggregate.dat b/src/include/catalog/pg_aggregate.dat index 0d8c5a922a..fc6d3bfd94 100644 --- a/src/include/catalog/pg_aggregate.dat +++ b/src/include/catalog/pg_aggregate.dat @@ -505,20 +505,20 @@ aggcombinefn => 'int2and', aggtranstype => 'int2' }, { aggfnoid => 'bit_or(int2)', aggtransfn => 'int2or', aggcombinefn => 'int2or', aggtranstype => 'int2' }, -{ aggfnoid => 'bit_xor(int2)', aggtransfn => 'int2xor', aggcombinefn => 'int2xor', - aggtranstype => 'int2' }, +{ aggfnoid => 'bit_xor(int2)', aggtransfn => 'int2xor', + aggcombinefn => 'int2xor', aggtranstype => 'int2' }, { aggfnoid => 'bit_and(int4)', aggtransfn => 'int4and', aggcombinefn => 'int4and', aggtranstype => 'int4' }, { aggfnoid => 'bit_or(int4)', aggtransfn => 'int4or', aggcombinefn => 'int4or', aggtranstype => 'int4' }, -{ aggfnoid => 'bit_xor(int4)', aggtransfn => 'int4xor', aggcombinefn => 'int4xor', - aggtranstype => 'int4' }, +{ aggfnoid => 'bit_xor(int4)', aggtransfn => 'int4xor', + aggcombinefn => 'int4xor', aggtranstype => 'int4' }, { aggfnoid => 'bit_and(int8)', aggtransfn => 'int8and', aggcombinefn => 'int8and', aggtranstype => 'int8' }, { aggfnoid => 'bit_or(int8)', aggtransfn => 'int8or', aggcombinefn => 'int8or', aggtranstype => 'int8' }, -{ aggfnoid => 'bit_xor(int8)', aggtransfn => 'int8xor', aggcombinefn => 'int8xor', - aggtranstype => 'int8' }, +{ aggfnoid => 'bit_xor(int8)', aggtransfn => 'int8xor', + aggcombinefn => 'int8xor', aggtranstype => 'int8' }, { aggfnoid => 'bit_and(bit)', aggtransfn => 'bitand', aggcombinefn => 'bitand', aggtranstype => 'bit' }, { aggfnoid => 'bit_or(bit)', aggtransfn => 'bitor', aggcombinefn => 'bitor', diff --git a/src/include/catalog/pg_amproc.dat b/src/include/catalog/pg_amproc.dat index 7fedf78099..5460aa2422 100644 --- a/src/include/catalog/pg_amproc.dat +++ b/src/include/catalog/pg_amproc.dat @@ -838,8 +838,7 @@ # bloom "char" { amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', - amprocrighttype => 'char', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'char', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', amprocrighttype => 'char', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -849,8 +848,7 @@ { amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', amprocrighttype => 'char', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', - amprocrighttype => 'char', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'char', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/char_bloom_ops', amproclefttype => 'char', amprocrighttype => 'char', amprocnum => '11', amproc => 'hashchar' }, @@ -869,8 +867,7 @@ # bloom name { amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', - amprocrighttype => 'name', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'name', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', amprocrighttype => 'name', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -880,8 +877,7 @@ { amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', amprocrighttype => 'name', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', - amprocrighttype => 'name', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'name', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/name_bloom_ops', amproclefttype => 'name', amprocrighttype => 'name', amprocnum => '11', amproc => 'hashname' }, @@ -933,12 +929,14 @@ amprocrighttype => 'int2', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', - amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'int2', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int2', - amprocrighttype => 'int2', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int2' }, + amprocrighttype => 'int2', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int2' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '1', @@ -950,12 +948,14 @@ amprocrighttype => 'int4', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', - amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'int4', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int4', - amprocrighttype => 'int4', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int4' }, + amprocrighttype => 'int4', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int4' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '1', @@ -967,17 +967,18 @@ amprocrighttype => 'int8', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', - amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'int8', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, { amprocfamily => 'brin/integer_minmax_multi_ops', amproclefttype => 'int8', - amprocrighttype => 'int8', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int8' }, + amprocrighttype => 'int8', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int8' }, # bloom integer: int2, int4, int8 { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', - amprocrighttype => 'int8', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'int8', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -987,14 +988,12 @@ { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', - amprocrighttype => 'int8', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'int8', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int8', amprocrighttype => 'int8', amprocnum => '11', amproc => 'hashint8' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', - amprocrighttype => 'int2', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'int2', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1004,14 +1003,12 @@ { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', - amprocrighttype => 'int2', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'int2', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int2', amprocrighttype => 'int2', amprocnum => '11', amproc => 'hashint2' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', - amprocrighttype => 'int4', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'int4', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1021,8 +1018,7 @@ { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', - amprocrighttype => 'int4', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'int4', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/integer_bloom_ops', amproclefttype => 'int4', amprocrighttype => 'int4', amprocnum => '11', amproc => 'hashint4' }, @@ -1041,8 +1037,7 @@ # bloom text { amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', - amprocrighttype => 'text', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'text', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', amprocrighttype => 'text', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1052,8 +1047,7 @@ { amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', amprocrighttype => 'text', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', - amprocrighttype => 'text', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'text', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/text_bloom_ops', amproclefttype => 'text', amprocrighttype => 'text', amprocnum => '11', amproc => 'hashtext' }, @@ -1071,7 +1065,8 @@ # minmax multi oid { amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', - amprocrighttype => 'oid', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, + amprocrighttype => 'oid', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, { amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, @@ -1079,12 +1074,14 @@ amprocrighttype => 'oid', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', - amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'oid', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, { amprocfamily => 'brin/oid_minmax_multi_ops', amproclefttype => 'oid', - amprocrighttype => 'oid', amprocnum => '11', amproc => 'brin_minmax_multi_distance_int4' }, + amprocrighttype => 'oid', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_int4' }, # bloom oid { amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', @@ -1098,8 +1095,7 @@ { amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', - amprocrighttype => 'oid', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'oid', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/oid_bloom_ops', amproclefttype => 'oid', amprocrighttype => 'oid', amprocnum => '11', amproc => 'hashoid' }, @@ -1127,14 +1123,14 @@ { amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', - amprocrighttype => 'tid', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'tid', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/tid_bloom_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '11', amproc => 'hashtid' }, # minmax multi tid { amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', - amprocrighttype => 'tid', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, + amprocrighttype => 'tid', amprocnum => '1', + amproc => 'brin_minmax_multi_opcinfo' }, { amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, @@ -1142,12 +1138,14 @@ amprocrighttype => 'tid', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', - amprocrighttype => 'tid', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'tid', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', amprocrighttype => 'tid', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, { amprocfamily => 'brin/tid_minmax_multi_ops', amproclefttype => 'tid', - amprocrighttype => 'tid', amprocnum => '11', amproc => 'brin_minmax_multi_distance_tid' }, + amprocrighttype => 'tid', amprocnum => '11', + amproc => 'brin_minmax_multi_distance_tid' }, # minmax float { amprocfamily => 'brin/float_minmax_ops', amproclefttype => 'float4', @@ -1226,14 +1224,12 @@ amprocrighttype => 'float4', amprocnum => '3', amproc => 'brin_bloom_consistent' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', - amprocrighttype => 'float4', amprocnum => '4', - amproc => 'brin_bloom_union' }, + amprocrighttype => 'float4', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', amprocrighttype => 'float4', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float4', - amprocrighttype => 'float4', amprocnum => '11', - amproc => 'hashfloat4' }, + amprocrighttype => 'float4', amprocnum => '11', amproc => 'hashfloat4' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', amprocrighttype => 'float8', amprocnum => '1', @@ -1245,14 +1241,12 @@ amprocrighttype => 'float8', amprocnum => '3', amproc => 'brin_bloom_consistent' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', - amprocrighttype => 'float8', amprocnum => '4', - amproc => 'brin_bloom_union' }, + amprocrighttype => 'float8', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', amprocrighttype => 'float8', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/float_bloom_ops', amproclefttype => 'float8', - amprocrighttype => 'float8', amprocnum => '11', - amproc => 'hashfloat8' }, + amprocrighttype => 'float8', amprocnum => '11', amproc => 'hashfloat8' }, # minmax macaddr { amprocfamily => 'brin/macaddr_minmax_ops', amproclefttype => 'macaddr', @@ -1305,8 +1299,7 @@ amprocrighttype => 'macaddr', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/macaddr_bloom_ops', amproclefttype => 'macaddr', - amprocrighttype => 'macaddr', amprocnum => '11', - amproc => 'hashmacaddr' }, + amprocrighttype => 'macaddr', amprocnum => '11', amproc => 'hashmacaddr' }, # minmax macaddr8 { amprocfamily => 'brin/macaddr8_minmax_ops', amproclefttype => 'macaddr8', @@ -1323,24 +1316,24 @@ amproc => 'brin_minmax_union' }, # minmax multi macaddr8 -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '1', +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '2', +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '3', +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '4', +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '5', +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, -{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '11', - amproc => 'brin_minmax_multi_distance_macaddr8' }, +{ amprocfamily => 'brin/macaddr8_minmax_multi_ops', + amproclefttype => 'macaddr8', amprocrighttype => 'macaddr8', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_macaddr8' }, # bloom macaddr8 { amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', @@ -1359,8 +1352,7 @@ amprocrighttype => 'macaddr8', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/macaddr8_bloom_ops', amproclefttype => 'macaddr8', - amprocrighttype => 'macaddr8', amprocnum => '11', - amproc => 'hashmacaddr8' }, + amprocrighttype => 'macaddr8', amprocnum => '11', amproc => 'hashmacaddr8' }, # minmax inet { amprocfamily => 'brin/network_minmax_ops', amproclefttype => 'inet', @@ -1397,8 +1389,7 @@ # bloom inet { amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', - amprocrighttype => 'inet', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'inet', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1408,8 +1399,7 @@ { amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', - amprocrighttype => 'inet', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'inet', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/network_bloom_ops', amproclefttype => 'inet', amprocrighttype => 'inet', amprocnum => '11', amproc => 'hashinet' }, @@ -1458,14 +1448,12 @@ amprocrighttype => 'bpchar', amprocnum => '3', amproc => 'brin_bloom_consistent' }, { amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', - amprocrighttype => 'bpchar', amprocnum => '4', - amproc => 'brin_bloom_union' }, + amprocrighttype => 'bpchar', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', amprocrighttype => 'bpchar', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/bpchar_bloom_ops', amproclefttype => 'bpchar', - amprocrighttype => 'bpchar', amprocnum => '11', - amproc => 'hashbpchar' }, + amprocrighttype => 'bpchar', amprocnum => '11', amproc => 'hashbpchar' }, # minmax time without time zone { amprocfamily => 'brin/time_minmax_ops', amproclefttype => 'time', @@ -1491,7 +1479,8 @@ amprocrighttype => 'time', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, { amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', - amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, + amprocrighttype => 'time', amprocnum => '4', + amproc => 'brin_minmax_multi_union' }, { amprocfamily => 'brin/time_minmax_multi_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, @@ -1501,8 +1490,7 @@ # bloom time without time zone { amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', - amprocrighttype => 'time', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'time', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1512,8 +1500,7 @@ { amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', - amprocrighttype => 'time', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'time', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/time_bloom_ops', amproclefttype => 'time', amprocrighttype => 'time', amprocnum => '11', amproc => 'time_hash' }, @@ -1557,43 +1544,43 @@ amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_minmax_union' }, # minmax multi datetime (date, timestamp, timestamptz) -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '1', - amproc => 'brin_minmax_multi_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '2', - amproc => 'brin_minmax_multi_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '3', - amproc => 'brin_minmax_multi_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '4', - amproc => 'brin_minmax_multi_union' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '5', - amproc => 'brin_minmax_multi_options' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamp', - amprocrighttype => 'timestamp', amprocnum => '11', - amproc => 'brin_minmax_multi_distance_timestamp' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '4', amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '5', amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamp', amprocrighttype => 'timestamp', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_timestamp' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '1', - amproc => 'brin_minmax_multi_opcinfo' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '2', - amproc => 'brin_minmax_multi_add_value' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '3', - amproc => 'brin_minmax_multi_consistent' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '4', - amproc => 'brin_minmax_multi_union' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '5', - amproc => 'brin_minmax_multi_options' }, -{ amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'timestamptz', - amprocrighttype => 'timestamptz', amprocnum => '11', - amproc => 'brin_minmax_multi_distance_timestamp' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '4', amproc => 'brin_minmax_multi_union' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '5', amproc => 'brin_minmax_multi_options' }, +{ amprocfamily => 'brin/datetime_minmax_multi_ops', + amproclefttype => 'timestamptz', amprocrighttype => 'timestamptz', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_timestamp' }, { amprocfamily => 'brin/datetime_minmax_multi_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '1', @@ -1654,8 +1641,7 @@ amproc => 'timestamp_hash' }, { amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', - amprocrighttype => 'date', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'date', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1665,8 +1651,7 @@ { amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', - amprocrighttype => 'date', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'date', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/datetime_bloom_ops', amproclefttype => 'date', amprocrighttype => 'date', amprocnum => '11', amproc => 'hashint4' }, @@ -1685,24 +1670,24 @@ amproc => 'brin_minmax_union' }, # minmax multi interval -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '1', +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '1', amproc => 'brin_minmax_multi_opcinfo' }, -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '2', +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '2', amproc => 'brin_minmax_multi_add_value' }, -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '3', +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '3', amproc => 'brin_minmax_multi_consistent' }, -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '4', +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '4', amproc => 'brin_minmax_multi_union' }, -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '5', +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', amprocnum => '5', amproc => 'brin_minmax_multi_options' }, -{ amprocfamily => 'brin/interval_minmax_multi_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '11', - amproc => 'brin_minmax_multi_distance_interval' }, +{ amprocfamily => 'brin/interval_minmax_multi_ops', + amproclefttype => 'interval', amprocrighttype => 'interval', + amprocnum => '11', amproc => 'brin_minmax_multi_distance_interval' }, # bloom interval { amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', @@ -1721,8 +1706,7 @@ amprocrighttype => 'interval', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/interval_bloom_ops', amproclefttype => 'interval', - amprocrighttype => 'interval', amprocnum => '11', - amproc => 'interval_hash' }, + amprocrighttype => 'interval', amprocnum => '11', amproc => 'interval_hash' }, # minmax time with time zone { amprocfamily => 'brin/timetz_minmax_ops', amproclefttype => 'timetz', @@ -1769,14 +1753,12 @@ amprocrighttype => 'timetz', amprocnum => '3', amproc => 'brin_bloom_consistent' }, { amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', - amprocrighttype => 'timetz', amprocnum => '4', - amproc => 'brin_bloom_union' }, + amprocrighttype => 'timetz', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', amprocrighttype => 'timetz', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/timetz_bloom_ops', amproclefttype => 'timetz', - amprocrighttype => 'timetz', amprocnum => '11', - amproc => 'timetz_hash' }, + amprocrighttype => 'timetz', amprocnum => '11', amproc => 'timetz_hash' }, # minmax bit { amprocfamily => 'brin/bit_minmax_ops', amproclefttype => 'bit', @@ -1855,8 +1837,7 @@ amprocrighttype => 'numeric', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/numeric_bloom_ops', amproclefttype => 'numeric', - amprocrighttype => 'numeric', amprocnum => '11', - amproc => 'hash_numeric' }, + amprocrighttype => 'numeric', amprocnum => '11', amproc => 'hash_numeric' }, # minmax uuid { amprocfamily => 'brin/uuid_minmax_ops', amproclefttype => 'uuid', @@ -1893,8 +1874,7 @@ # bloom uuid { amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', - amprocrighttype => 'uuid', amprocnum => '1', - amproc => 'brin_bloom_opcinfo' }, + amprocrighttype => 'uuid', amprocnum => '1', amproc => 'brin_bloom_opcinfo' }, { amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '2', amproc => 'brin_bloom_add_value' }, @@ -1904,8 +1884,7 @@ { amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', - amprocrighttype => 'uuid', amprocnum => '5', - amproc => 'brin_bloom_options' }, + amprocrighttype => 'uuid', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/uuid_bloom_ops', amproclefttype => 'uuid', amprocrighttype => 'uuid', amprocnum => '11', amproc => 'uuid_hash' }, @@ -1977,14 +1956,12 @@ amprocrighttype => 'pg_lsn', amprocnum => '3', amproc => 'brin_bloom_consistent' }, { amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', - amprocrighttype => 'pg_lsn', amprocnum => '4', - amproc => 'brin_bloom_union' }, + amprocrighttype => 'pg_lsn', amprocnum => '4', amproc => 'brin_bloom_union' }, { amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', amprocrighttype => 'pg_lsn', amprocnum => '5', amproc => 'brin_bloom_options' }, { amprocfamily => 'brin/pg_lsn_bloom_ops', amproclefttype => 'pg_lsn', - amprocrighttype => 'pg_lsn', amprocnum => '11', - amproc => 'pg_lsn_hash' }, + amprocrighttype => 'pg_lsn', amprocnum => '11', amproc => 'pg_lsn_hash' }, # inclusion box { amprocfamily => 'brin/box_inclusion_ops', amproclefttype => 'box', diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h index 52bfd2cb7b..6400702b3d 100644 --- a/src/include/catalog/pg_collation.h +++ b/src/include/catalog/pg_collation.h @@ -42,9 +42,9 @@ CATALOG(pg_collation,3456,CollationRelationId) NameData collcollate; /* LC_COLLATE setting */ NameData collctype; /* LC_CTYPE setting */ #ifdef CATALOG_VARLEN /* variable-length fields start here */ - text collversion BKI_DEFAULT(_null_); /* provider-dependent */ - /* version of */ - /* collation data */ + text collversion BKI_DEFAULT(_null_); /* provider-dependent + * version of collation + * data */ #endif } FormData_pg_collation; diff --git a/src/include/catalog/pg_opclass.dat b/src/include/catalog/pg_opclass.dat index da25befefe..484727a2fc 100644 --- a/src/include/catalog/pg_opclass.dat +++ b/src/include/catalog/pg_opclass.dat @@ -267,114 +267,114 @@ opcfamily => 'brin/bytea_minmax_ops', opcintype => 'bytea', opckeytype => 'bytea' }, { opcmethod => 'brin', opcname => 'bytea_bloom_ops', - opcfamily => 'brin/bytea_bloom_ops', opcintype => 'bytea', - opckeytype => 'bytea', opcdefault => 'f' }, + opcfamily => 'brin/bytea_bloom_ops', opcintype => 'bytea', opcdefault => 'f', + opckeytype => 'bytea' }, { opcmethod => 'brin', opcname => 'char_minmax_ops', opcfamily => 'brin/char_minmax_ops', opcintype => 'char', opckeytype => 'char' }, { opcmethod => 'brin', opcname => 'char_bloom_ops', - opcfamily => 'brin/char_bloom_ops', opcintype => 'char', - opckeytype => 'char', opcdefault => 'f' }, + opcfamily => 'brin/char_bloom_ops', opcintype => 'char', opcdefault => 'f', + opckeytype => 'char' }, { opcmethod => 'brin', opcname => 'name_minmax_ops', opcfamily => 'brin/name_minmax_ops', opcintype => 'name', opckeytype => 'name' }, { opcmethod => 'brin', opcname => 'name_bloom_ops', - opcfamily => 'brin/name_bloom_ops', opcintype => 'name', - opckeytype => 'name', opcdefault => 'f' }, + opcfamily => 'brin/name_bloom_ops', opcintype => 'name', opcdefault => 'f', + opckeytype => 'name' }, { opcmethod => 'brin', opcname => 'int8_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int8', opckeytype => 'int8' }, { opcmethod => 'brin', opcname => 'int8_minmax_multi_ops', opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int8', - opckeytype => 'int8', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'int8' }, { opcmethod => 'brin', opcname => 'int8_bloom_ops', - opcfamily => 'brin/integer_bloom_ops', opcintype => 'int8', - opckeytype => 'int8', opcdefault => 'f' }, + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int8', opcdefault => 'f', + opckeytype => 'int8' }, { opcmethod => 'brin', opcname => 'int2_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int2', opckeytype => 'int2' }, { opcmethod => 'brin', opcname => 'int2_minmax_multi_ops', opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int2', - opckeytype => 'int2', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'int2' }, { opcmethod => 'brin', opcname => 'int2_bloom_ops', - opcfamily => 'brin/integer_bloom_ops', opcintype => 'int2', - opckeytype => 'int2', opcdefault => 'f' }, + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int2', opcdefault => 'f', + opckeytype => 'int2' }, { opcmethod => 'brin', opcname => 'int4_minmax_ops', opcfamily => 'brin/integer_minmax_ops', opcintype => 'int4', opckeytype => 'int4' }, { opcmethod => 'brin', opcname => 'int4_minmax_multi_ops', opcfamily => 'brin/integer_minmax_multi_ops', opcintype => 'int4', - opckeytype => 'int4', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'int4' }, { opcmethod => 'brin', opcname => 'int4_bloom_ops', - opcfamily => 'brin/integer_bloom_ops', opcintype => 'int4', - opckeytype => 'int4', opcdefault => 'f' }, + opcfamily => 'brin/integer_bloom_ops', opcintype => 'int4', opcdefault => 'f', + opckeytype => 'int4' }, { opcmethod => 'brin', opcname => 'text_minmax_ops', opcfamily => 'brin/text_minmax_ops', opcintype => 'text', opckeytype => 'text' }, { opcmethod => 'brin', opcname => 'text_bloom_ops', - opcfamily => 'brin/text_bloom_ops', opcintype => 'text', - opckeytype => 'text', opcdefault => 'f' }, + opcfamily => 'brin/text_bloom_ops', opcintype => 'text', opcdefault => 'f', + opckeytype => 'text' }, { opcmethod => 'brin', opcname => 'oid_minmax_ops', opcfamily => 'brin/oid_minmax_ops', opcintype => 'oid', opckeytype => 'oid' }, { opcmethod => 'brin', opcname => 'oid_minmax_multi_ops', opcfamily => 'brin/oid_minmax_multi_ops', opcintype => 'oid', - opckeytype => 'oid', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'oid' }, { opcmethod => 'brin', opcname => 'oid_bloom_ops', - opcfamily => 'brin/oid_bloom_ops', opcintype => 'oid', - opckeytype => 'oid', opcdefault => 'f' }, + opcfamily => 'brin/oid_bloom_ops', opcintype => 'oid', opcdefault => 'f', + opckeytype => 'oid' }, { opcmethod => 'brin', opcname => 'tid_minmax_ops', opcfamily => 'brin/tid_minmax_ops', opcintype => 'tid', opckeytype => 'tid' }, { opcmethod => 'brin', opcname => 'tid_bloom_ops', - opcfamily => 'brin/tid_bloom_ops', opcintype => 'tid', opckeytype => 'tid', - opcdefault => 'f'}, + opcfamily => 'brin/tid_bloom_ops', opcintype => 'tid', opcdefault => 'f', + opckeytype => 'tid' }, { opcmethod => 'brin', opcname => 'tid_minmax_multi_ops', opcfamily => 'brin/tid_minmax_multi_ops', opcintype => 'tid', - opckeytype => 'tid', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'tid' }, { opcmethod => 'brin', opcname => 'float4_minmax_ops', opcfamily => 'brin/float_minmax_ops', opcintype => 'float4', opckeytype => 'float4' }, { opcmethod => 'brin', opcname => 'float4_minmax_multi_ops', opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float4', - opckeytype => 'float4', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'float4' }, { opcmethod => 'brin', opcname => 'float4_bloom_ops', - opcfamily => 'brin/float_bloom_ops', opcintype => 'float4', - opckeytype => 'float4', opcdefault => 'f' }, + opcfamily => 'brin/float_bloom_ops', opcintype => 'float4', opcdefault => 'f', + opckeytype => 'float4' }, { opcmethod => 'brin', opcname => 'float8_minmax_ops', opcfamily => 'brin/float_minmax_ops', opcintype => 'float8', opckeytype => 'float8' }, { opcmethod => 'brin', opcname => 'float8_minmax_multi_ops', opcfamily => 'brin/float_minmax_multi_ops', opcintype => 'float8', - opckeytype => 'float8', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'float8' }, { opcmethod => 'brin', opcname => 'float8_bloom_ops', - opcfamily => 'brin/float_bloom_ops', opcintype => 'float8', - opckeytype => 'float8', opcdefault => 'f' }, + opcfamily => 'brin/float_bloom_ops', opcintype => 'float8', opcdefault => 'f', + opckeytype => 'float8' }, { opcmethod => 'brin', opcname => 'macaddr_minmax_ops', opcfamily => 'brin/macaddr_minmax_ops', opcintype => 'macaddr', opckeytype => 'macaddr' }, { opcmethod => 'brin', opcname => 'macaddr_minmax_multi_ops', opcfamily => 'brin/macaddr_minmax_multi_ops', opcintype => 'macaddr', - opckeytype => 'macaddr', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'macaddr' }, { opcmethod => 'brin', opcname => 'macaddr_bloom_ops', opcfamily => 'brin/macaddr_bloom_ops', opcintype => 'macaddr', - opckeytype => 'macaddr', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'macaddr' }, { opcmethod => 'brin', opcname => 'macaddr8_minmax_ops', opcfamily => 'brin/macaddr8_minmax_ops', opcintype => 'macaddr8', opckeytype => 'macaddr8' }, { opcmethod => 'brin', opcname => 'macaddr8_minmax_multi_ops', opcfamily => 'brin/macaddr8_minmax_multi_ops', opcintype => 'macaddr8', - opckeytype => 'macaddr8', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'macaddr8' }, { opcmethod => 'brin', opcname => 'macaddr8_bloom_ops', opcfamily => 'brin/macaddr8_bloom_ops', opcintype => 'macaddr8', - opckeytype => 'macaddr8', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'macaddr8' }, { opcmethod => 'brin', opcname => 'inet_minmax_ops', opcfamily => 'brin/network_minmax_ops', opcintype => 'inet', opcdefault => 'f', opckeytype => 'inet' }, { opcmethod => 'brin', opcname => 'inet_minmax_multi_ops', opcfamily => 'brin/network_minmax_multi_ops', opcintype => 'inet', - opcdefault => 'f', opckeytype => 'inet', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'inet' }, { opcmethod => 'brin', opcname => 'inet_bloom_ops', - opcfamily => 'brin/network_bloom_ops', opcintype => 'inet', - opcdefault => 'f', opckeytype => 'inet', opcdefault => 'f' }, + opcfamily => 'brin/network_bloom_ops', opcintype => 'inet', opcdefault => 'f', + opckeytype => 'inet' }, { opcmethod => 'brin', opcname => 'inet_inclusion_ops', opcfamily => 'brin/network_inclusion_ops', opcintype => 'inet', opckeytype => 'inet' }, @@ -383,61 +383,61 @@ opckeytype => 'bpchar' }, { opcmethod => 'brin', opcname => 'bpchar_bloom_ops', opcfamily => 'brin/bpchar_bloom_ops', opcintype => 'bpchar', - opckeytype => 'bpchar', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'bpchar' }, { opcmethod => 'brin', opcname => 'time_minmax_ops', opcfamily => 'brin/time_minmax_ops', opcintype => 'time', opckeytype => 'time' }, { opcmethod => 'brin', opcname => 'time_minmax_multi_ops', opcfamily => 'brin/time_minmax_multi_ops', opcintype => 'time', - opckeytype => 'time', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'time' }, { opcmethod => 'brin', opcname => 'time_bloom_ops', - opcfamily => 'brin/time_bloom_ops', opcintype => 'time', - opckeytype => 'time', opcdefault => 'f' }, + opcfamily => 'brin/time_bloom_ops', opcintype => 'time', opcdefault => 'f', + opckeytype => 'time' }, { opcmethod => 'brin', opcname => 'date_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'date', opckeytype => 'date' }, { opcmethod => 'brin', opcname => 'date_minmax_multi_ops', opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'date', - opckeytype => 'date', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'date' }, { opcmethod => 'brin', opcname => 'date_bloom_ops', opcfamily => 'brin/datetime_bloom_ops', opcintype => 'date', - opckeytype => 'date', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'date' }, { opcmethod => 'brin', opcname => 'timestamp_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamp', opckeytype => 'timestamp' }, { opcmethod => 'brin', opcname => 'timestamp_minmax_multi_ops', opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamp', - opckeytype => 'timestamp', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timestamp' }, { opcmethod => 'brin', opcname => 'timestamp_bloom_ops', opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamp', - opckeytype => 'timestamp', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timestamp' }, { opcmethod => 'brin', opcname => 'timestamptz_minmax_ops', opcfamily => 'brin/datetime_minmax_ops', opcintype => 'timestamptz', opckeytype => 'timestamptz' }, { opcmethod => 'brin', opcname => 'timestamptz_minmax_multi_ops', opcfamily => 'brin/datetime_minmax_multi_ops', opcintype => 'timestamptz', - opckeytype => 'timestamptz', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timestamptz' }, { opcmethod => 'brin', opcname => 'timestamptz_bloom_ops', opcfamily => 'brin/datetime_bloom_ops', opcintype => 'timestamptz', - opckeytype => 'timestamptz', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timestamptz' }, { opcmethod => 'brin', opcname => 'interval_minmax_ops', opcfamily => 'brin/interval_minmax_ops', opcintype => 'interval', opckeytype => 'interval' }, { opcmethod => 'brin', opcname => 'interval_minmax_multi_ops', opcfamily => 'brin/interval_minmax_multi_ops', opcintype => 'interval', - opckeytype => 'interval', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'interval' }, { opcmethod => 'brin', opcname => 'interval_bloom_ops', opcfamily => 'brin/interval_bloom_ops', opcintype => 'interval', - opckeytype => 'interval', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'interval' }, { opcmethod => 'brin', opcname => 'timetz_minmax_ops', opcfamily => 'brin/timetz_minmax_ops', opcintype => 'timetz', opckeytype => 'timetz' }, { opcmethod => 'brin', opcname => 'timetz_minmax_multi_ops', opcfamily => 'brin/timetz_minmax_multi_ops', opcintype => 'timetz', - opckeytype => 'timetz', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timetz' }, { opcmethod => 'brin', opcname => 'timetz_bloom_ops', opcfamily => 'brin/timetz_bloom_ops', opcintype => 'timetz', - opckeytype => 'timetz', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'timetz' }, { opcmethod => 'brin', opcname => 'bit_minmax_ops', opcfamily => 'brin/bit_minmax_ops', opcintype => 'bit', opckeytype => 'bit' }, { opcmethod => 'brin', opcname => 'varbit_minmax_ops', @@ -448,10 +448,10 @@ opckeytype => 'numeric' }, { opcmethod => 'brin', opcname => 'numeric_minmax_multi_ops', opcfamily => 'brin/numeric_minmax_multi_ops', opcintype => 'numeric', - opckeytype => 'numeric', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'numeric' }, { opcmethod => 'brin', opcname => 'numeric_bloom_ops', opcfamily => 'brin/numeric_bloom_ops', opcintype => 'numeric', - opckeytype => 'numeric', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'numeric' }, # no brin opclass for record, anyarray @@ -460,10 +460,10 @@ opckeytype => 'uuid' }, { opcmethod => 'brin', opcname => 'uuid_minmax_multi_ops', opcfamily => 'brin/uuid_minmax_multi_ops', opcintype => 'uuid', - opckeytype => 'uuid', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'uuid' }, { opcmethod => 'brin', opcname => 'uuid_bloom_ops', - opcfamily => 'brin/uuid_bloom_ops', opcintype => 'uuid', - opckeytype => 'uuid', opcdefault => 'f' }, + opcfamily => 'brin/uuid_bloom_ops', opcintype => 'uuid', opcdefault => 'f', + opckeytype => 'uuid' }, { opcmethod => 'brin', opcname => 'range_inclusion_ops', opcfamily => 'brin/range_inclusion_ops', opcintype => 'anyrange', opckeytype => 'anyrange' }, @@ -472,10 +472,10 @@ opckeytype => 'pg_lsn' }, { opcmethod => 'brin', opcname => 'pg_lsn_minmax_multi_ops', opcfamily => 'brin/pg_lsn_minmax_multi_ops', opcintype => 'pg_lsn', - opckeytype => 'pg_lsn', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'pg_lsn' }, { opcmethod => 'brin', opcname => 'pg_lsn_bloom_ops', opcfamily => 'brin/pg_lsn_bloom_ops', opcintype => 'pg_lsn', - opckeytype => 'pg_lsn', opcdefault => 'f' }, + opcdefault => 'f', opckeytype => 'pg_lsn' }, # no brin opclass for enum, tsvector, tsquery, jsonb diff --git a/src/include/catalog/pg_operator.dat b/src/include/catalog/pg_operator.dat index 85395a81ee..ec1615cccc 100644 --- a/src/include/catalog/pg_operator.dat +++ b/src/include/catalog/pg_operator.dat @@ -241,11 +241,13 @@ oprname => '>', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '<(tid,tid)', oprnegate => '<=(tid,tid)', oprcode => 'tidgt', oprrest => 'scalargtsel', oprjoin => 'scalargtjoinsel' }, -{ oid => '2801', oid_symbol => 'TIDLessEqOperator', descr => 'less than or equal', +{ oid => '2801', oid_symbol => 'TIDLessEqOperator', + descr => 'less than or equal', oprname => '<=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '>=(tid,tid)', oprnegate => '>(tid,tid)', oprcode => 'tidle', oprrest => 'scalarlesel', oprjoin => 'scalarlejoinsel' }, -{ oid => '2802', oid_symbol => 'TIDGreaterEqOperator', descr => 'greater than or equal', +{ oid => '2802', oid_symbol => 'TIDGreaterEqOperator', + descr => 'greater than or equal', oprname => '>=', oprleft => 'tid', oprright => 'tid', oprresult => 'bool', oprcom => '<=(tid,tid)', oprnegate => '<(tid,tid)', oprcode => 'tidge', oprrest => 'scalargesel', oprjoin => 'scalargejoinsel' }, diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 26c3fc0f6b..c3c38c748f 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -1448,7 +1448,7 @@ proargtypes => 'bytea bytea int4', prosrc => 'byteaoverlay_no_len' }, { oid => '8436', descr => 'number of set bits', proname => 'bit_count', prorettype => 'int8', proargtypes => 'bytea', - prosrc => 'bytea_bit_count'}, + prosrc => 'bytea_bit_count' }, { oid => '725', proname => 'dist_pl', prorettype => 'float8', proargtypes => 'point line', @@ -3731,7 +3731,8 @@ { oid => '8103', descr => 'list of catalog foreign key relationships', proname => 'pg_get_catalog_foreign_keys', procost => '10', prorows => '250', proretset => 't', provolatile => 's', prorettype => 'record', - proargtypes => '', proallargtypes => '{regclass,_text,regclass,_text,bool,bool}', + proargtypes => '', + proallargtypes => '{regclass,_text,regclass,_text,bool,bool}', proargmodes => '{o,o,o,o,o,o}', proargnames => '{fktable,fkcols,pktable,pkcols,is_array,is_opt}', prosrc => 'pg_get_catalog_foreign_keys' }, @@ -3905,7 +3906,7 @@ prosrc => 'bitsetbit' }, { oid => '8435', descr => 'number of set bits', proname => 'bit_count', prorettype => 'int8', proargtypes => 'bit', - prosrc => 'bit_bit_count'}, + prosrc => 'bit_bit_count' }, # for macaddr type support { oid => '436', descr => 'I/O', @@ -5309,8 +5310,8 @@ proargnames => '{pid,status,receive_start_lsn,receive_start_tli,written_lsn,flushed_lsn,received_tli,last_msg_send_time,last_msg_receipt_time,latest_end_lsn,latest_end_time,slot_name,sender_host,sender_port,conninfo}', prosrc => 'pg_stat_get_wal_receiver' }, { oid => '8595', descr => 'statistics: information about replication slot', - proname => 'pg_stat_get_replication_slot', prorows => '1', - proisstrict => 'f', proretset => 't', provolatile => 's', proparallel => 'r', + proname => 'pg_stat_get_replication_slot', prorows => '1', proisstrict => 'f', + proretset => 't', provolatile => 's', proparallel => 'r', prorettype => 'record', proargtypes => 'text', proallargtypes => '{text,text,int8,int8,int8,int8,int8,int8,int8,int8,timestamptz}', proargmodes => '{i,o,o,o,o,o,o,o,o,o,o}', @@ -5838,15 +5839,14 @@ proname => 'date_trunc', prorettype => 'timestamp', proargtypes => 'text timestamp', prosrc => 'timestamp_trunc' }, -{ oid => '8990', - descr => 'bin timestamp into specified interval', +{ oid => '8990', descr => 'bin timestamp into specified interval', proname => 'date_bin', prorettype => 'timestamp', - proargtypes => 'interval timestamp timestamp', - prosrc => 'timestamp_bin' }, + proargtypes => 'interval timestamp timestamp', prosrc => 'timestamp_bin' }, { oid => '8993', descr => 'bin timestamp with time zone into specified interval', proname => 'date_bin', prorettype => 'timestamptz', - proargtypes => 'interval timestamptz timestamptz', prosrc => 'timestamptz_bin' }, + proargtypes => 'interval timestamptz timestamptz', + prosrc => 'timestamptz_bin' }, { oid => '2021', descr => 'extract field from timestamp', proname => 'date_part', prorettype => 'float8', @@ -6186,14 +6186,15 @@ { oid => '2171', descr => 'cancel a server process\' current query', proname => 'pg_cancel_backend', provolatile => 'v', prorettype => 'bool', proargtypes => 'int4', prosrc => 'pg_cancel_backend' }, -{ oid => '2096', descr => 'terminate a backend process and if timeout is specified, wait for its exit or until timeout occurs', +{ oid => '2096', + descr => 'terminate a backend process and if timeout is specified, wait for its exit or until timeout occurs', proname => 'pg_terminate_backend', provolatile => 'v', prorettype => 'bool', proargtypes => 'int4 int8', proargnames => '{pid,timeout}', prosrc => 'pg_terminate_backend' }, { oid => '2137', descr => 'wait for a backend process exit or timeout occurs', - proname => 'pg_wait_for_backend_termination', provolatile => 'v', prorettype => 'bool', - proargtypes => 'int4 int8', proargnames => '{pid,timeout}', - prosrc => 'pg_wait_for_backend_termination' }, + proname => 'pg_wait_for_backend_termination', provolatile => 'v', + prorettype => 'bool', proargtypes => 'int4 int8', + proargnames => '{pid,timeout}', prosrc => 'pg_wait_for_backend_termination' }, { oid => '2172', descr => 'prepare for taking an online backup', proname => 'pg_start_backup', provolatile => 'v', proparallel => 'r', prorettype => 'pg_lsn', proargtypes => 'text bool bool', @@ -7151,8 +7152,7 @@ descr => 'bytes required to store the value, perhaps with compression', proname => 'pg_column_size', provolatile => 's', prorettype => 'int4', proargtypes => 'any', prosrc => 'pg_column_size' }, -{ oid => '2121', - descr => 'compression method for the compressed datum', +{ oid => '2121', descr => 'compression method for the compressed datum', proname => 'pg_column_compression', provolatile => 's', prorettype => 'text', proargtypes => 'any', prosrc => 'pg_column_compression' }, { oid => '2322', @@ -7971,9 +7971,9 @@ # logging memory contexts of the specified backend { oid => '4543', descr => 'log memory contexts of the specified backend', - proname => 'pg_log_backend_memory_contexts', - provolatile => 'v', prorettype => 'bool', - proargtypes => 'int4', prosrc => 'pg_log_backend_memory_contexts' }, + proname => 'pg_log_backend_memory_contexts', provolatile => 'v', + prorettype => 'bool', proargtypes => 'int4', + prosrc => 'pg_log_backend_memory_contexts' }, # non-persistent series generator { oid => '1066', descr => 'non-persistent series generator', @@ -8059,8 +8059,8 @@ proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int2', proargtypes => 'int2', prosrc => 'aggregate_dummy' }, { oid => '8452', descr => 'bitwise-xor smallint aggregate', - proname => 'bit_xor', prokind => 'a', proisstrict => 'f', prorettype => 'int2', - proargtypes => 'int2', prosrc => 'aggregate_dummy' }, + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int2', proargtypes => 'int2', prosrc => 'aggregate_dummy' }, { oid => '2238', descr => 'bitwise-and integer aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, @@ -8068,8 +8068,8 @@ proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, { oid => '8453', descr => 'bitwise-xor integer aggregate', - proname => 'bit_xor', prokind => 'a', proisstrict => 'f', prorettype => 'int4', - proargtypes => 'int4', prosrc => 'aggregate_dummy' }, + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int4', proargtypes => 'int4', prosrc => 'aggregate_dummy' }, { oid => '2240', descr => 'bitwise-and bigint aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, @@ -8077,8 +8077,8 @@ proname => 'bit_or', prokind => 'a', proisstrict => 'f', prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, { oid => '8454', descr => 'bitwise-xor bigint aggregate', - proname => 'bit_xor', prokind => 'a', proisstrict => 'f', prorettype => 'int8', - proargtypes => 'int8', prosrc => 'aggregate_dummy' }, + proname => 'bit_xor', prokind => 'a', proisstrict => 'f', + prorettype => 'int8', proargtypes => 'int8', prosrc => 'aggregate_dummy' }, { oid => '2242', descr => 'bitwise-and bit aggregate', proname => 'bit_and', prokind => 'a', proisstrict => 'f', prorettype => 'bit', proargtypes => 'bit', prosrc => 'aggregate_dummy' }, @@ -8289,62 +8289,81 @@ prosrc => 'brin_minmax_multi_consistent' }, { oid => '4619', descr => 'BRIN multi minmax support', proname => 'brin_minmax_multi_union', prorettype => 'bool', - proargtypes => 'internal internal internal', prosrc => 'brin_minmax_multi_union' }, + proargtypes => 'internal internal internal', + prosrc => 'brin_minmax_multi_union' }, { oid => '4620', descr => 'BRIN multi minmax support', - proname => 'brin_minmax_multi_options', prorettype => 'void', proisstrict => 'f', - proargtypes => 'internal', prosrc => 'brin_minmax_multi_options' }, + proname => 'brin_minmax_multi_options', proisstrict => 'f', + prorettype => 'void', proargtypes => 'internal', + prosrc => 'brin_minmax_multi_options' }, { oid => '4621', descr => 'BRIN multi minmax int2 distance', proname => 'brin_minmax_multi_distance_int2', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int2' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int2' }, { oid => '4622', descr => 'BRIN multi minmax int4 distance', proname => 'brin_minmax_multi_distance_int4', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int4' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int4' }, { oid => '4623', descr => 'BRIN multi minmax int8 distance', proname => 'brin_minmax_multi_distance_int8', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_int8' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_int8' }, { oid => '4624', descr => 'BRIN multi minmax float4 distance', proname => 'brin_minmax_multi_distance_float4', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_float4' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_float4' }, { oid => '4625', descr => 'BRIN multi minmax float8 distance', proname => 'brin_minmax_multi_distance_float8', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_float8' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_float8' }, { oid => '4626', descr => 'BRIN multi minmax numeric distance', proname => 'brin_minmax_multi_distance_numeric', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_numeric' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_numeric' }, { oid => '4627', descr => 'BRIN multi minmax tid distance', proname => 'brin_minmax_multi_distance_tid', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_tid' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_tid' }, { oid => '4628', descr => 'BRIN multi minmax uuid distance', proname => 'brin_minmax_multi_distance_uuid', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_uuid' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_uuid' }, { oid => '4629', descr => 'BRIN multi minmax date distance', proname => 'brin_minmax_multi_distance_date', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_date' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_date' }, { oid => '4630', descr => 'BRIN multi minmax time distance', proname => 'brin_minmax_multi_distance_time', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_time' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_time' }, { oid => '4631', descr => 'BRIN multi minmax interval distance', proname => 'brin_minmax_multi_distance_interval', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_interval' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_interval' }, { oid => '4632', descr => 'BRIN multi minmax timetz distance', proname => 'brin_minmax_multi_distance_timetz', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_timetz' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_timetz' }, { oid => '4633', descr => 'BRIN multi minmax pg_lsn distance', proname => 'brin_minmax_multi_distance_pg_lsn', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_pg_lsn' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_pg_lsn' }, { oid => '4634', descr => 'BRIN multi minmax macaddr distance', proname => 'brin_minmax_multi_distance_macaddr', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_macaddr' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_macaddr' }, { oid => '4635', descr => 'BRIN multi minmax macaddr8 distance', proname => 'brin_minmax_multi_distance_macaddr8', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_macaddr8' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_macaddr8' }, { oid => '4636', descr => 'BRIN multi minmax inet distance', proname => 'brin_minmax_multi_distance_inet', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_inet' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_inet' }, { oid => '4637', descr => 'BRIN multi minmax timestamp distance', proname => 'brin_minmax_multi_distance_timestamp', prorettype => 'float8', - proargtypes => 'internal internal', prosrc => 'brin_minmax_multi_distance_timestamp' }, + proargtypes => 'internal internal', + prosrc => 'brin_minmax_multi_distance_timestamp' }, # BRIN inclusion { oid => '4105', descr => 'BRIN inclusion support', @@ -8377,10 +8396,9 @@ prosrc => 'brin_bloom_consistent' }, { oid => '4594', descr => 'BRIN bloom support', proname => 'brin_bloom_union', prorettype => 'bool', - proargtypes => 'internal internal internal', - prosrc => 'brin_bloom_union' }, + proargtypes => 'internal internal internal', prosrc => 'brin_bloom_union' }, { oid => '4595', descr => 'BRIN bloom support', - proname => 'brin_bloom_options', prorettype => 'void', proisstrict => 'f', + proname => 'brin_bloom_options', proisstrict => 'f', prorettype => 'void', proargtypes => 'internal', prosrc => 'brin_bloom_options' }, # userlock replacements @@ -10437,9 +10455,8 @@ proargtypes => 'anymultirange int8', prosrc => 'hash_multirange_extended' }, { oid => '4280', descr => 'int4multirange constructor', - proname => 'int4multirange', - prorettype => 'int4multirange', proargtypes => '', - prosrc => 'multirange_constructor0' }, + proname => 'int4multirange', prorettype => 'int4multirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, { oid => '4281', descr => 'int4multirange constructor', proname => 'int4multirange', prorettype => 'int4multirange', proargtypes => 'int4range', prosrc => 'multirange_constructor1' }, @@ -10449,8 +10466,8 @@ proallargtypes => '{_int4range}', proargmodes => '{v}', prosrc => 'multirange_constructor2' }, { oid => '4283', descr => 'nummultirange constructor', - proname => 'nummultirange', prorettype => 'nummultirange', - proargtypes => '', prosrc => 'multirange_constructor0' }, + proname => 'nummultirange', prorettype => 'nummultirange', proargtypes => '', + prosrc => 'multirange_constructor0' }, { oid => '4284', descr => 'nummultirange constructor', proname => 'nummultirange', prorettype => 'nummultirange', proargtypes => 'numrange', prosrc => 'multirange_constructor1' }, @@ -10460,8 +10477,8 @@ proallargtypes => '{_numrange}', proargmodes => '{v}', prosrc => 'multirange_constructor2' }, { oid => '4286', descr => 'tsmultirange constructor', - proname => 'tsmultirange', prorettype => 'tsmultirange', - proargtypes => '', prosrc => 'multirange_constructor0' }, + proname => 'tsmultirange', prorettype => 'tsmultirange', proargtypes => '', + prosrc => 'multirange_constructor0' }, { oid => '4287', descr => 'tsmultirange constructor', proname => 'tsmultirange', prorettype => 'tsmultirange', proargtypes => 'tsrange', prosrc => 'multirange_constructor1' }, @@ -10471,9 +10488,8 @@ proallargtypes => '{_tsrange}', proargmodes => '{v}', prosrc => 'multirange_constructor2' }, { oid => '4289', descr => 'tstzmultirange constructor', - proname => 'tstzmultirange', - prorettype => 'tstzmultirange', proargtypes => '', - prosrc => 'multirange_constructor0' }, + proname => 'tstzmultirange', prorettype => 'tstzmultirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, { oid => '4290', descr => 'tstzmultirange constructor', proname => 'tstzmultirange', prorettype => 'tstzmultirange', proargtypes => 'tstzrange', prosrc => 'multirange_constructor1' }, @@ -10483,9 +10499,8 @@ proallargtypes => '{_tstzrange}', proargmodes => '{v}', prosrc => 'multirange_constructor2' }, { oid => '4292', descr => 'datemultirange constructor', - proname => 'datemultirange', - prorettype => 'datemultirange', proargtypes => '', - prosrc => 'multirange_constructor0' }, + proname => 'datemultirange', prorettype => 'datemultirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, { oid => '4293', descr => 'datemultirange constructor', proname => 'datemultirange', prorettype => 'datemultirange', proargtypes => 'daterange', prosrc => 'multirange_constructor1' }, @@ -10495,9 +10510,8 @@ proallargtypes => '{_daterange}', proargmodes => '{v}', prosrc => 'multirange_constructor2' }, { oid => '4295', descr => 'int8multirange constructor', - proname => 'int8multirange', - prorettype => 'int8multirange', proargtypes => '', - prosrc => 'multirange_constructor0' }, + proname => 'int8multirange', prorettype => 'int8multirange', + proargtypes => '', prosrc => 'multirange_constructor0' }, { oid => '4296', descr => 'int8multirange constructor', proname => 'int8multirange', prorettype => 'int8multirange', proargtypes => 'int8range', prosrc => 'multirange_constructor1' }, @@ -10686,7 +10700,8 @@ prosrc => 'pg_get_replication_slots' }, { oid => '3786', descr => 'set up a logical replication slot', proname => 'pg_create_logical_replication_slot', provolatile => 'v', - proparallel => 'u', prorettype => 'record', proargtypes => 'name name bool bool', + proparallel => 'u', prorettype => 'record', + proargtypes => 'name name bool bool', proallargtypes => '{name,name,bool,bool,name,pg_lsn}', proargmodes => '{i,i,i,i,o,o}', proargnames => '{slot_name,plugin,temporary,twophase,slot_name,lsn}', @@ -10959,13 +10974,13 @@ { oid => '4302', descr => 'internal conversion function for KOI8R to MULE_INTERNAL', proname => 'koi8r_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8r_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4303', descr => 'internal conversion function for MULE_INTERNAL to KOI8R', proname => 'mic_to_koi8r', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4304', descr => 'internal conversion function for ISO-8859-5 to MULE_INTERNAL', proname => 'iso_to_mic', prolang => 'c', prorettype => 'int4', @@ -10979,23 +10994,23 @@ { oid => '4306', descr => 'internal conversion function for WIN1251 to MULE_INTERNAL', proname => 'win1251_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1251_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1251_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4307', descr => 'internal conversion function for MULE_INTERNAL to WIN1251', proname => 'mic_to_win1251', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_win1251', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4308', descr => 'internal conversion function for WIN866 to MULE_INTERNAL', proname => 'win866_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win866_to_mic', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_mic', probin => '$libdir/cyrillic_and_mic' }, { oid => '4309', descr => 'internal conversion function for MULE_INTERNAL to WIN866', proname => 'mic_to_win866', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4310', descr => 'internal conversion function for KOI8R to WIN1251', proname => 'koi8r_to_win1251', prolang => 'c', prorettype => 'int4', proargtypes => 'int4 int4 cstring internal int4 bool', @@ -11006,12 +11021,12 @@ prosrc => 'win1251_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4312', descr => 'internal conversion function for KOI8R to WIN866', proname => 'koi8r_to_win866', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8r_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4313', descr => 'internal conversion function for WIN866 to KOI8R', proname => 'win866_to_koi8r', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win866_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4314', descr => 'internal conversion function for WIN866 to WIN1251', proname => 'win866_to_win1251', prolang => 'c', prorettype => 'int4', @@ -11025,129 +11040,129 @@ { oid => '4316', descr => 'internal conversion function for ISO-8859-5 to KOI8R', proname => 'iso_to_koi8r', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso_to_koi8r', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_koi8r', probin => '$libdir/cyrillic_and_mic' }, { oid => '4317', descr => 'internal conversion function for KOI8R to ISO-8859-5', proname => 'koi8r_to_iso', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8r_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4318', descr => 'internal conversion function for ISO-8859-5 to WIN1251', proname => 'iso_to_win1251', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso_to_win1251', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_win1251', probin => '$libdir/cyrillic_and_mic' }, { oid => '4319', descr => 'internal conversion function for WIN1251 to ISO-8859-5', proname => 'win1251_to_iso', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1251_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1251_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4320', descr => 'internal conversion function for ISO-8859-5 to WIN866', proname => 'iso_to_win866', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso_to_win866', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso_to_win866', probin => '$libdir/cyrillic_and_mic' }, { oid => '4321', descr => 'internal conversion function for WIN866 to ISO-8859-5', proname => 'win866_to_iso', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win866_to_iso', - probin => '$libdir/cyrillic_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win866_to_iso', probin => '$libdir/cyrillic_and_mic' }, { oid => '4322', descr => 'internal conversion function for EUC_CN to MULE_INTERNAL', proname => 'euc_cn_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_cn_to_mic', - probin => '$libdir/euc_cn_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_cn_to_mic', probin => '$libdir/euc_cn_and_mic' }, { oid => '4323', descr => 'internal conversion function for MULE_INTERNAL to EUC_CN', proname => 'mic_to_euc_cn', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_euc_cn', - probin => '$libdir/euc_cn_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_cn', probin => '$libdir/euc_cn_and_mic' }, { oid => '4324', descr => 'internal conversion function for EUC_JP to SJIS', proname => 'euc_jp_to_sjis', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_jp_to_sjis', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_sjis', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4325', descr => 'internal conversion function for SJIS to EUC_JP', proname => 'sjis_to_euc_jp', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'sjis_to_euc_jp', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_euc_jp', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4326', descr => 'internal conversion function for EUC_JP to MULE_INTERNAL', proname => 'euc_jp_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_jp_to_mic', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_mic', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4327', descr => 'internal conversion function for SJIS to MULE_INTERNAL', proname => 'sjis_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'sjis_to_mic', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_mic', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4328', descr => 'internal conversion function for MULE_INTERNAL to EUC_JP', proname => 'mic_to_euc_jp', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_euc_jp', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_jp', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4329', descr => 'internal conversion function for MULE_INTERNAL to SJIS', proname => 'mic_to_sjis', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_sjis', - probin => '$libdir/euc_jp_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_sjis', probin => '$libdir/euc_jp_and_sjis' }, { oid => '4330', descr => 'internal conversion function for EUC_KR to MULE_INTERNAL', proname => 'euc_kr_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_kr_to_mic', - probin => '$libdir/euc_kr_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_kr_to_mic', probin => '$libdir/euc_kr_and_mic' }, { oid => '4331', descr => 'internal conversion function for MULE_INTERNAL to EUC_KR', proname => 'mic_to_euc_kr', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_euc_kr', - probin => '$libdir/euc_kr_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_kr', probin => '$libdir/euc_kr_and_mic' }, { oid => '4332', descr => 'internal conversion function for EUC_TW to BIG5', proname => 'euc_tw_to_big5', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_tw_to_big5', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_big5', probin => '$libdir/euc_tw_and_big5' }, { oid => '4333', descr => 'internal conversion function for BIG5 to EUC_TW', proname => 'big5_to_euc_tw', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'big5_to_euc_tw', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_euc_tw', probin => '$libdir/euc_tw_and_big5' }, { oid => '4334', descr => 'internal conversion function for EUC_TW to MULE_INTERNAL', proname => 'euc_tw_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_tw_to_mic', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_mic', probin => '$libdir/euc_tw_and_big5' }, { oid => '4335', descr => 'internal conversion function for BIG5 to MULE_INTERNAL', proname => 'big5_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'big5_to_mic', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_mic', probin => '$libdir/euc_tw_and_big5' }, { oid => '4336', descr => 'internal conversion function for MULE_INTERNAL to EUC_TW', proname => 'mic_to_euc_tw', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_euc_tw', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_euc_tw', probin => '$libdir/euc_tw_and_big5' }, { oid => '4337', descr => 'internal conversion function for MULE_INTERNAL to BIG5', proname => 'mic_to_big5', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_big5', - probin => '$libdir/euc_tw_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_big5', probin => '$libdir/euc_tw_and_big5' }, { oid => '4338', descr => 'internal conversion function for LATIN2 to MULE_INTERNAL', proname => 'latin2_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'latin2_to_mic', - probin => '$libdir/latin2_and_win1250' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin2_to_mic', probin => '$libdir/latin2_and_win1250' }, { oid => '4339', descr => 'internal conversion function for MULE_INTERNAL to LATIN2', proname => 'mic_to_latin2', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_latin2', - probin => '$libdir/latin2_and_win1250' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin2', probin => '$libdir/latin2_and_win1250' }, { oid => '4340', descr => 'internal conversion function for WIN1250 to MULE_INTERNAL', proname => 'win1250_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win1250_to_mic', - probin => '$libdir/latin2_and_win1250' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win1250_to_mic', probin => '$libdir/latin2_and_win1250' }, { oid => '4341', descr => 'internal conversion function for MULE_INTERNAL to WIN1250', proname => 'mic_to_win1250', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_win1250', - probin => '$libdir/latin2_and_win1250' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_win1250', probin => '$libdir/latin2_and_win1250' }, { oid => '4342', descr => 'internal conversion function for LATIN2 to WIN1250', proname => 'latin2_to_win1250', prolang => 'c', prorettype => 'int4', @@ -11161,123 +11176,123 @@ { oid => '4344', descr => 'internal conversion function for LATIN1 to MULE_INTERNAL', proname => 'latin1_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'latin1_to_mic', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin1_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4345', descr => 'internal conversion function for MULE_INTERNAL to LATIN1', proname => 'mic_to_latin1', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_latin1', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin1', probin => '$libdir/latin_and_mic' }, { oid => '4346', descr => 'internal conversion function for LATIN3 to MULE_INTERNAL', proname => 'latin3_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'latin3_to_mic', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin3_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4347', descr => 'internal conversion function for MULE_INTERNAL to LATIN3', proname => 'mic_to_latin3', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_latin3', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin3', probin => '$libdir/latin_and_mic' }, { oid => '4348', descr => 'internal conversion function for LATIN4 to MULE_INTERNAL', proname => 'latin4_to_mic', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'latin4_to_mic', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'latin4_to_mic', probin => '$libdir/latin_and_mic' }, { oid => '4349', descr => 'internal conversion function for MULE_INTERNAL to LATIN4', proname => 'mic_to_latin4', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'mic_to_latin4', - probin => '$libdir/latin_and_mic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'mic_to_latin4', probin => '$libdir/latin_and_mic' }, { oid => '4352', descr => 'internal conversion function for BIG5 to UTF8', proname => 'big5_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'big5_to_utf8', - probin => '$libdir/utf8_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'big5_to_utf8', probin => '$libdir/utf8_and_big5' }, { oid => '4353', descr => 'internal conversion function for UTF8 to BIG5', proname => 'utf8_to_big5', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_big5', - probin => '$libdir/utf8_and_big5' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_big5', probin => '$libdir/utf8_and_big5' }, { oid => '4354', descr => 'internal conversion function for UTF8 to KOI8R', proname => 'utf8_to_koi8r', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_koi8r', - probin => '$libdir/utf8_and_cyrillic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_koi8r', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4355', descr => 'internal conversion function for KOI8R to UTF8', proname => 'koi8r_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8r_to_utf8', - probin => '$libdir/utf8_and_cyrillic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8r_to_utf8', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4356', descr => 'internal conversion function for UTF8 to KOI8U', proname => 'utf8_to_koi8u', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_koi8u', - probin => '$libdir/utf8_and_cyrillic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_koi8u', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4357', descr => 'internal conversion function for KOI8U to UTF8', proname => 'koi8u_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'koi8u_to_utf8', - probin => '$libdir/utf8_and_cyrillic' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'koi8u_to_utf8', probin => '$libdir/utf8_and_cyrillic' }, { oid => '4358', descr => 'internal conversion function for UTF8 to WIN', proname => 'utf8_to_win', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_win', - probin => '$libdir/utf8_and_win' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_win', probin => '$libdir/utf8_and_win' }, { oid => '4359', descr => 'internal conversion function for WIN to UTF8', proname => 'win_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'win_to_utf8', - probin => '$libdir/utf8_and_win' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'win_to_utf8', probin => '$libdir/utf8_and_win' }, { oid => '4360', descr => 'internal conversion function for EUC_CN to UTF8', proname => 'euc_cn_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_cn_to_utf8', - probin => '$libdir/utf8_and_euc_cn' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_cn_to_utf8', probin => '$libdir/utf8_and_euc_cn' }, { oid => '4361', descr => 'internal conversion function for UTF8 to EUC_CN', proname => 'utf8_to_euc_cn', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_euc_cn', - probin => '$libdir/utf8_and_euc_cn' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_cn', probin => '$libdir/utf8_and_euc_cn' }, { oid => '4362', descr => 'internal conversion function for EUC_JP to UTF8', proname => 'euc_jp_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_jp_to_utf8', - probin => '$libdir/utf8_and_euc_jp' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_jp_to_utf8', probin => '$libdir/utf8_and_euc_jp' }, { oid => '4363', descr => 'internal conversion function for UTF8 to EUC_JP', proname => 'utf8_to_euc_jp', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_euc_jp', - probin => '$libdir/utf8_and_euc_jp' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_jp', probin => '$libdir/utf8_and_euc_jp' }, { oid => '4364', descr => 'internal conversion function for EUC_KR to UTF8', proname => 'euc_kr_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_kr_to_utf8', - probin => '$libdir/utf8_and_euc_kr' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_kr_to_utf8', probin => '$libdir/utf8_and_euc_kr' }, { oid => '4365', descr => 'internal conversion function for UTF8 to EUC_KR', proname => 'utf8_to_euc_kr', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_euc_kr', - probin => '$libdir/utf8_and_euc_kr' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_kr', probin => '$libdir/utf8_and_euc_kr' }, { oid => '4366', descr => 'internal conversion function for EUC_TW to UTF8', proname => 'euc_tw_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'euc_tw_to_utf8', - probin => '$libdir/utf8_and_euc_tw' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'euc_tw_to_utf8', probin => '$libdir/utf8_and_euc_tw' }, { oid => '4367', descr => 'internal conversion function for UTF8 to EUC_TW', proname => 'utf8_to_euc_tw', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_euc_tw', - probin => '$libdir/utf8_and_euc_tw' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_euc_tw', probin => '$libdir/utf8_and_euc_tw' }, { oid => '4368', descr => 'internal conversion function for GB18030 to UTF8', proname => 'gb18030_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'gb18030_to_utf8', - probin => '$libdir/utf8_and_gb18030' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'gb18030_to_utf8', probin => '$libdir/utf8_and_gb18030' }, { oid => '4369', descr => 'internal conversion function for UTF8 to GB18030', proname => 'utf8_to_gb18030', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_gb18030', - probin => '$libdir/utf8_and_gb18030' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_gb18030', probin => '$libdir/utf8_and_gb18030' }, { oid => '4370', descr => 'internal conversion function for GBK to UTF8', proname => 'gbk_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'gbk_to_utf8', - probin => '$libdir/utf8_and_gbk' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'gbk_to_utf8', probin => '$libdir/utf8_and_gbk' }, { oid => '4371', descr => 'internal conversion function for UTF8 to GBK', proname => 'utf8_to_gbk', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_gbk', - probin => '$libdir/utf8_and_gbk' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_gbk', probin => '$libdir/utf8_and_gbk' }, { oid => '4372', descr => 'internal conversion function for UTF8 to ISO-8859 2-16', proname => 'utf8_to_iso8859', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_iso8859', - probin => '$libdir/utf8_and_iso8859' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_iso8859', probin => '$libdir/utf8_and_iso8859' }, { oid => '4373', descr => 'internal conversion function for ISO-8859 2-16 to UTF8', proname => 'iso8859_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'iso8859_to_utf8', - probin => '$libdir/utf8_and_iso8859' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'iso8859_to_utf8', probin => '$libdir/utf8_and_iso8859' }, { oid => '4374', descr => 'internal conversion function for LATIN1 to UTF8', proname => 'iso8859_1_to_utf8', prolang => 'c', prorettype => 'int4', proargtypes => 'int4 int4 cstring internal int4 bool', @@ -11288,28 +11303,28 @@ prosrc => 'utf8_to_iso8859_1', probin => '$libdir/utf8_and_iso8859_1' }, { oid => '4376', descr => 'internal conversion function for JOHAB to UTF8', proname => 'johab_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'johab_to_utf8', - probin => '$libdir/utf8_and_johab' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'johab_to_utf8', probin => '$libdir/utf8_and_johab' }, { oid => '4377', descr => 'internal conversion function for UTF8 to JOHAB', proname => 'utf8_to_johab', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_johab', - probin => '$libdir/utf8_and_johab' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_johab', probin => '$libdir/utf8_and_johab' }, { oid => '4378', descr => 'internal conversion function for SJIS to UTF8', proname => 'sjis_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'sjis_to_utf8', - probin => '$libdir/utf8_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'sjis_to_utf8', probin => '$libdir/utf8_and_sjis' }, { oid => '4379', descr => 'internal conversion function for UTF8 to SJIS', proname => 'utf8_to_sjis', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_sjis', - probin => '$libdir/utf8_and_sjis' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_sjis', probin => '$libdir/utf8_and_sjis' }, { oid => '4380', descr => 'internal conversion function for UHC to UTF8', proname => 'uhc_to_utf8', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'uhc_to_utf8', - probin => '$libdir/utf8_and_uhc' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'uhc_to_utf8', probin => '$libdir/utf8_and_uhc' }, { oid => '4381', descr => 'internal conversion function for UTF8 to UHC', proname => 'utf8_to_uhc', prolang => 'c', prorettype => 'int4', - proargtypes => 'int4 int4 cstring internal int4 bool', prosrc => 'utf8_to_uhc', - probin => '$libdir/utf8_and_uhc' }, + proargtypes => 'int4 int4 cstring internal int4 bool', + prosrc => 'utf8_to_uhc', probin => '$libdir/utf8_and_uhc' }, { oid => '4382', descr => 'internal conversion function for EUC_JIS_2004 to UTF8', proname => 'euc_jis_2004_to_utf8', prolang => 'c', prorettype => 'int4', @@ -11586,21 +11601,25 @@ prorettype => 'pg_brin_bloom_summary', proargtypes => 'internal', prosrc => 'brin_bloom_summary_recv' }, { oid => '4599', descr => 'I/O', - proname => 'brin_bloom_summary_send', provolatile => 's', prorettype => 'bytea', - proargtypes => 'pg_brin_bloom_summary', prosrc => 'brin_bloom_summary_send' }, + proname => 'brin_bloom_summary_send', provolatile => 's', + prorettype => 'bytea', proargtypes => 'pg_brin_bloom_summary', + prosrc => 'brin_bloom_summary_send' }, { oid => '4638', descr => 'I/O', - proname => 'brin_minmax_multi_summary_in', prorettype => 'pg_brin_minmax_multi_summary', - proargtypes => 'cstring', prosrc => 'brin_minmax_multi_summary_in' }, + proname => 'brin_minmax_multi_summary_in', + prorettype => 'pg_brin_minmax_multi_summary', proargtypes => 'cstring', + prosrc => 'brin_minmax_multi_summary_in' }, { oid => '4639', descr => 'I/O', proname => 'brin_minmax_multi_summary_out', prorettype => 'cstring', - proargtypes => 'pg_brin_minmax_multi_summary', prosrc => 'brin_minmax_multi_summary_out' }, + proargtypes => 'pg_brin_minmax_multi_summary', + prosrc => 'brin_minmax_multi_summary_out' }, { oid => '4640', descr => 'I/O', proname => 'brin_minmax_multi_summary_recv', provolatile => 's', prorettype => 'pg_brin_minmax_multi_summary', proargtypes => 'internal', prosrc => 'brin_minmax_multi_summary_recv' }, { oid => '4641', descr => 'I/O', - proname => 'brin_minmax_multi_summary_send', provolatile => 's', prorettype => 'bytea', - proargtypes => 'pg_brin_minmax_multi_summary', prosrc => 'brin_minmax_multi_summary_send' }, + proname => 'brin_minmax_multi_summary_send', provolatile => 's', + prorettype => 'bytea', proargtypes => 'pg_brin_minmax_multi_summary', + prosrc => 'brin_minmax_multi_summary_send' }, ] diff --git a/src/include/catalog/pg_type.dat b/src/include/catalog/pg_type.dat index 8c145c00be..09fe7691db 100644 --- a/src/include/catalog/pg_type.dat +++ b/src/include/catalog/pg_type.dat @@ -443,9 +443,9 @@ # jsonb { oid => '3802', array_type_oid => '3807', descr => 'Binary JSON', typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U', - typinput => 'jsonb_in', typoutput => 'jsonb_out', typreceive => 'jsonb_recv', - typsend => 'jsonb_send', typalign => 'i', typstorage => 'x', - typsubscript => 'jsonb_subscript_handler' }, + typsubscript => 'jsonb_subscript_handler', typinput => 'jsonb_in', + typoutput => 'jsonb_out', typreceive => 'jsonb_recv', typsend => 'jsonb_send', + typalign => 'i', typstorage => 'x' }, { oid => '4072', array_type_oid => '4073', descr => 'JSON path', typname => 'jsonpath', typlen => '-1', typbyval => 'f', typcategory => 'U', typinput => 'jsonpath_in', typoutput => 'jsonpath_out', @@ -679,16 +679,17 @@ typtype => 'p', typcategory => 'P', typinput => 'anycompatiblemultirange_in', typoutput => 'anycompatiblemultirange_out', typreceive => '-', typsend => '-', typalign => 'd', typstorage => 'x' }, -{ oid => '4600', - descr => 'BRIN bloom summary', - typname => 'pg_brin_bloom_summary', typlen => '-1', typbyval => 'f', typcategory => 'S', - typinput => 'brin_bloom_summary_in', typoutput => 'brin_bloom_summary_out', +{ oid => '4600', descr => 'BRIN bloom summary', + typname => 'pg_brin_bloom_summary', typlen => '-1', typbyval => 'f', + typcategory => 'S', typinput => 'brin_bloom_summary_in', + typoutput => 'brin_bloom_summary_out', typreceive => 'brin_bloom_summary_recv', typsend => 'brin_bloom_summary_send', typalign => 'i', typstorage => 'x', typcollation => 'default' }, -{ oid => '4601', - descr => 'BRIN minmax-multi summary', - typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f', typcategory => 'S', - typinput => 'brin_minmax_multi_summary_in', typoutput => 'brin_minmax_multi_summary_out', - typreceive => 'brin_minmax_multi_summary_recv', typsend => 'brin_minmax_multi_summary_send', - typalign => 'i', typstorage => 'x', typcollation => 'default' }, +{ oid => '4601', descr => 'BRIN minmax-multi summary', + typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f', + typcategory => 'S', typinput => 'brin_minmax_multi_summary_in', + typoutput => 'brin_minmax_multi_summary_out', + typreceive => 'brin_minmax_multi_summary_recv', + typsend => 'brin_minmax_multi_summary_send', typalign => 'i', + typstorage => 'x', typcollation => 'default' }, ] diff --git a/src/include/catalog/renumber_oids.pl b/src/include/catalog/renumber_oids.pl index 52c32dc961..660f7ddf24 100755 --- a/src/include/catalog/renumber_oids.pl +++ b/src/include/catalog/renumber_oids.pl @@ -62,7 +62,7 @@ if ($output_path ne '' && substr($output_path, -1) ne '/') # Collect all the existing assigned OIDs (including those to be remapped). my @header_files = glob("pg_*.h"); -my $oids = Catalog::FindAllOidsFromHeaders(@header_files); +my $oids = Catalog::FindAllOidsFromHeaders(@header_files); # Hash-ify the existing OIDs for convenient lookup. my %oidhash; diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h index 8c4748e33d..264895d278 100644 --- a/src/include/commands/copy.h +++ b/src/include/commands/copy.h @@ -62,8 +62,8 @@ extern void DoCopy(ParseState *state, const CopyStmt *stmt, extern void ProcessCopyOptions(ParseState *pstate, CopyFormatOptions *ops_out, bool is_from, List *options); extern CopyFromState BeginCopyFrom(ParseState *pstate, Relation rel, Node *whereClause, - const char *filename, - bool is_program, copy_data_source_cb data_source_cb, List *attnamelist, List *options); + const char *filename, + bool is_program, copy_data_source_cb data_source_cb, List *attnamelist, List *options); extern void EndCopyFrom(CopyFromState cstate); extern bool NextCopyFrom(CopyFromState cstate, ExprContext *econtext, Datum *values, bool *nulls); diff --git a/src/include/commands/copyfrom_internal.h b/src/include/commands/copyfrom_internal.h index 858af7a717..4d68d9cceb 100644 --- a/src/include/commands/copyfrom_internal.h +++ b/src/include/commands/copyfrom_internal.h @@ -129,23 +129,23 @@ typedef struct CopyFromStateData /* * input_buf holds input data, already converted to database encoding. * - * In text mode, CopyReadLine parses this data sufficiently to locate - * line boundaries, then transfers the data to line_buf. We guarantee - * that there is a \0 at input_buf[input_buf_len] at all times. (In - * binary mode, input_buf is not used.) + * In text mode, CopyReadLine parses this data sufficiently to locate line + * boundaries, then transfers the data to line_buf. We guarantee that + * there is a \0 at input_buf[input_buf_len] at all times. (In binary + * mode, input_buf is not used.) * * If encoding conversion is not required, input_buf is not a separate * buffer but points directly to raw_buf. In that case, input_buf_len * tracks the number of bytes that have been verified as valid in the - * database encoding, and raw_buf_len is the total number of bytes - * stored in the buffer. + * database encoding, and raw_buf_len is the total number of bytes stored + * in the buffer. */ #define INPUT_BUF_SIZE 65536 /* we palloc INPUT_BUF_SIZE+1 bytes */ char *input_buf; int input_buf_index; /* next byte to process */ - int input_buf_len; /* total # of bytes stored */ + int input_buf_len; /* total # of bytes stored */ bool input_reached_eof; /* true if we reached EOF */ - bool input_reached_error; /* true if a conversion error happened */ + bool input_reached_error; /* true if a conversion error happened */ /* Shorthand for number of unconsumed bytes available in input_buf */ #define INPUT_BUF_BYTES(cstate) ((cstate)->input_buf_len - (cstate)->input_buf_index) diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index 6bce4d76fe..42bf1c7519 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -83,7 +83,7 @@ extern ObjectAddress AlterOperator(AlterOperatorStmt *stmt); extern ObjectAddress CreateStatistics(CreateStatsStmt *stmt); extern ObjectAddress AlterStatistics(AlterStatsStmt *stmt); extern void RemoveStatisticsById(Oid statsOid); -extern Oid StatisticsGetRelation(Oid statId, bool missing_ok); +extern Oid StatisticsGetRelation(Oid statId, bool missing_ok); /* commands/aggregatecmds.c */ extern ObjectAddress DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, diff --git a/src/include/executor/execAsync.h b/src/include/executor/execAsync.h index 724034f226..7551b553f8 100644 --- a/src/include/executor/execAsync.h +++ b/src/include/executor/execAsync.h @@ -22,4 +22,4 @@ extern void ExecAsyncResponse(AsyncRequest *areq); extern void ExecAsyncRequestDone(AsyncRequest *areq, TupleTableSlot *result); extern void ExecAsyncRequestPending(AsyncRequest *areq); -#endif /* EXECASYNC_H */ +#endif /* EXECASYNC_H */ diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h index b56ce26da0..a9e14e2fbe 100644 --- a/src/include/executor/functions.h +++ b/src/include/executor/functions.h @@ -30,7 +30,7 @@ typedef struct SQLFunctionParseInfo char **argnames; /* names of input arguments; NULL if none */ /* Note that argnames[i] can be NULL, if some args are unnamed */ Oid collation; /* function's input collation, if known */ -} SQLFunctionParseInfo; +} SQLFunctionParseInfo; typedef SQLFunctionParseInfo *SQLFunctionParseInfoPtr; diff --git a/src/include/foreign/fdwapi.h b/src/include/foreign/fdwapi.h index 4f17becbb8..a801cd3057 100644 --- a/src/include/foreign/fdwapi.h +++ b/src/include/foreign/fdwapi.h @@ -87,10 +87,10 @@ typedef TupleTableSlot *(*ExecForeignInsert_function) (EState *estate, TupleTableSlot *planSlot); typedef TupleTableSlot **(*ExecForeignBatchInsert_function) (EState *estate, - ResultRelInfo *rinfo, - TupleTableSlot **slots, - TupleTableSlot **planSlots, - int *numSlots); + ResultRelInfo *rinfo, + TupleTableSlot **slots, + TupleTableSlot **planSlots, + int *numSlots); typedef int (*GetForeignModifyBatchSize_function) (ResultRelInfo *rinfo); diff --git a/src/include/lib/sort_template.h b/src/include/lib/sort_template.h index 24d6d0006c..f52627d8ce 100644 --- a/src/include/lib/sort_template.h +++ b/src/include/lib/sort_template.h @@ -176,11 +176,11 @@ #ifdef ST_COMPARE_RUNTIME_POINTER typedef int (*ST_COMPARATOR_TYPE_NAME) (const ST_ELEMENT_TYPE *, - const ST_ELEMENT_TYPE *ST_SORT_PROTO_ARG); + const ST_ELEMENT_TYPE * ST_SORT_PROTO_ARG); #endif /* Declare the sort function. Note optional arguments at end. */ -ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE *first, size_t n +ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE * first, size_t n ST_SORT_PROTO_ELEMENT_SIZE ST_SORT_PROTO_COMPARE ST_SORT_PROTO_ARG); @@ -245,9 +245,9 @@ ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE *first, size_t n * in the qsort function. */ static pg_noinline ST_ELEMENT_TYPE * -ST_MED3(ST_ELEMENT_TYPE *a, - ST_ELEMENT_TYPE *b, - ST_ELEMENT_TYPE *c +ST_MED3(ST_ELEMENT_TYPE * a, + ST_ELEMENT_TYPE * b, + ST_ELEMENT_TYPE * c ST_SORT_PROTO_COMPARE ST_SORT_PROTO_ARG) { @@ -257,7 +257,7 @@ ST_MED3(ST_ELEMENT_TYPE *a, } static inline void -ST_SWAP(ST_POINTER_TYPE *a, ST_POINTER_TYPE *b) +ST_SWAP(ST_POINTER_TYPE * a, ST_POINTER_TYPE * b) { ST_POINTER_TYPE tmp = *a; @@ -266,7 +266,7 @@ ST_SWAP(ST_POINTER_TYPE *a, ST_POINTER_TYPE *b) } static inline void -ST_SWAPN(ST_POINTER_TYPE *a, ST_POINTER_TYPE *b, size_t n) +ST_SWAPN(ST_POINTER_TYPE * a, ST_POINTER_TYPE * b, size_t n) { for (size_t i = 0; i < n; ++i) ST_SWAP(&a[i], &b[i]); @@ -276,7 +276,7 @@ ST_SWAPN(ST_POINTER_TYPE *a, ST_POINTER_TYPE *b, size_t n) * Sort an array. */ ST_SCOPE void -ST_SORT(ST_ELEMENT_TYPE *data, size_t n +ST_SORT(ST_ELEMENT_TYPE * data, size_t n ST_SORT_PROTO_ELEMENT_SIZE ST_SORT_PROTO_COMPARE ST_SORT_PROTO_ARG) diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 91a1c3a780..7795a69490 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -461,9 +461,9 @@ typedef struct ResultRelInfo bool ri_usesFdwDirectModify; /* batch insert stuff */ - int ri_NumSlots; /* number of slots in the array */ - int ri_BatchSize; /* max slots inserted in a single batch */ - TupleTableSlot **ri_Slots; /* input tuples for batch insert */ + int ri_NumSlots; /* number of slots in the array */ + int ri_BatchSize; /* max slots inserted in a single batch */ + TupleTableSlot **ri_Slots; /* input tuples for batch insert */ TupleTableSlot **ri_PlanSlots; /* list of WithCheckOption's to be checked */ @@ -1255,16 +1255,16 @@ struct AppendState int as_whichplan; bool as_begun; /* false means need to initialize */ Bitmapset *as_asyncplans; /* asynchronous plans indexes */ - int as_nasyncplans; /* # of asynchronous plans */ + int as_nasyncplans; /* # of asynchronous plans */ AsyncRequest **as_asyncrequests; /* array of AsyncRequests */ TupleTableSlot **as_asyncresults; /* unreturned results of async plans */ int as_nasyncresults; /* # of valid entries in as_asyncresults */ bool as_syncdone; /* true if all synchronous plans done in * asynchronous mode, else false */ int as_nasyncremain; /* # of remaining asynchronous plans */ - Bitmapset *as_needrequest; /* asynchronous plans needing a new request */ - struct WaitEventSet *as_eventset; /* WaitEventSet used to configure - * file descriptor wait events */ + Bitmapset *as_needrequest; /* asynchronous plans needing a new request */ + struct WaitEventSet *as_eventset; /* WaitEventSet used to configure file + * descriptor wait events */ int as_first_partial_plan; /* Index of 'appendplans' containing * the first partial plan */ ParallelAppendState *as_pstate; /* parallel coordination info */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index fea3123251..ef73342019 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1929,7 +1929,7 @@ typedef enum AlterTableType AT_GenericOptions, /* OPTIONS (...) */ AT_AttachPartition, /* ATTACH PARTITION */ AT_DetachPartition, /* DETACH PARTITION */ - AT_DetachPartitionFinalize, /* DETACH PARTITION FINALIZE */ + AT_DetachPartitionFinalize, /* DETACH PARTITION FINALIZE */ AT_AddIdentity, /* ADD IDENTITY */ AT_SetIdentity, /* SET identity column options */ AT_DropIdentity, /* DROP IDENTITY */ diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h index a65bda7e3c..b7b2817a5d 100644 --- a/src/include/nodes/pathnodes.h +++ b/src/include/nodes/pathnodes.h @@ -1103,7 +1103,7 @@ typedef struct PathTarget Index *sortgrouprefs; /* corresponding sort/group refnos, or 0 */ QualCost cost; /* cost of evaluating the expressions */ int width; /* estimated avg width of result tuples */ - VolatileFunctionStatus has_volatile_expr; /* indicates if exprs contain + VolatileFunctionStatus has_volatile_expr; /* indicates if exprs contain * any volatile functions. */ } PathTarget; @@ -2054,7 +2054,7 @@ typedef struct RestrictInfo bool leakproof; /* true if known to contain no leaked Vars */ - VolatileFunctionStatus has_volatile; /* to indicate if clause contains + VolatileFunctionStatus has_volatile; /* to indicate if clause contains * any volatile functions. */ Index security_level; /* see comment above */ diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h index 841401be20..57f320a175 100644 --- a/src/include/nodes/plannodes.h +++ b/src/include/nodes/plannodes.h @@ -132,7 +132,7 @@ typedef struct Plan /* * information needed for asynchronous execution */ - bool async_capable; /* engage asynchronous-capable logic? */ + bool async_capable; /* engage asynchronous-capable logic? */ /* * Common structural data for all Plan types. diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index 42ee43f0aa..27da86e5e0 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -357,8 +357,8 @@ * memory even when clobber is off, or to 0 to never free relation cache * memory even when clobbering is on. */ -/* #define RECOVER_RELATION_BUILD_MEMORY 0 */ /* Force disable */ -/* #define RECOVER_RELATION_BUILD_MEMORY 1 */ /* Force enable */ + /* #define RECOVER_RELATION_BUILD_MEMORY 0 */ /* Force disable */ + /* #define RECOVER_RELATION_BUILD_MEMORY 1 */ /* Force enable */ /* * Define this to force all parse and plan trees to be passed through diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 72ff4a06d6..5fbd3a05ba 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -13,12 +13,12 @@ #include "datatype/timestamp.h" #include "portability/instr_time.h" -#include "postmaster/pgarch.h" /* for MAX_XFN_CHARS */ +#include "postmaster/pgarch.h" /* for MAX_XFN_CHARS */ #include "utils/backend_progress.h" /* for backward compatibility */ -#include "utils/backend_status.h" /* for backward compatibility */ +#include "utils/backend_status.h" /* for backward compatibility */ #include "utils/hsearch.h" #include "utils/relcache.h" -#include "utils/wait_event.h" /* for backward compatibility */ +#include "utils/wait_event.h" /* for backward compatibility */ /* ---------- @@ -379,7 +379,7 @@ typedef struct PgStat_MsgResetslrucounter typedef struct PgStat_MsgResetreplslotcounter { PgStat_MsgHdr m_hdr; - NameData m_slotname; + NameData m_slotname; bool clearall; } PgStat_MsgResetreplslotcounter; diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h index 328473bdc9..5b3c280dd7 100644 --- a/src/include/storage/fd.h +++ b/src/include/storage/fd.h @@ -45,10 +45,11 @@ #include -typedef enum RecoveryInitSyncMethod { +typedef enum RecoveryInitSyncMethod +{ RECOVERY_INIT_SYNC_METHOD_FSYNC, RECOVERY_INIT_SYNC_METHOD_SYNCFS -} RecoveryInitSyncMethod; +} RecoveryInitSyncMethod; struct iovec; /* avoid including port/pg_iovec.h here */ @@ -58,7 +59,7 @@ typedef int File; /* GUC parameter */ extern PGDLLIMPORT int max_files_per_process; extern PGDLLIMPORT bool data_sync_retry; -extern int recovery_init_sync_method; +extern int recovery_init_sync_method; /* * This is private to fd.c, but exported for save/restore_backend_variables() diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 2fd1ff09a7..be67d8a861 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -38,9 +38,9 @@ typedef struct XidCacheStatus { /* number of cached subxids, never more than PGPROC_MAX_CACHED_SUBXIDS */ - uint8 count; + uint8 count; /* has PGPROC->subxids overflowed */ - bool overflowed; + bool overflowed; } XidCacheStatus; struct XidCache @@ -145,8 +145,8 @@ struct PGPROC * else InvalidLocalTransactionId */ int pid; /* Backend's process ID; 0 if prepared xact */ - int pgxactoff; /* offset into various ProcGlobal->arrays - * with data mirrored from this PGPROC */ + int pgxactoff; /* offset into various ProcGlobal->arrays with + * data mirrored from this PGPROC */ int pgprocno; /* These fields are zero while a backend is still starting up: */ @@ -207,8 +207,8 @@ struct PGPROC */ SHM_QUEUE myProcLocks[NUM_LOCK_PARTITIONS]; - XidCacheStatus subxidStatus; /* mirrored with - * ProcGlobal->subxidStates[i] */ + XidCacheStatus subxidStatus; /* mirrored with + * ProcGlobal->subxidStates[i] */ struct XidCache subxids; /* cache for subtransaction XIDs */ /* Support for group XID clearing. */ diff --git a/src/include/utils/backend_progress.h b/src/include/utils/backend_progress.h index 1714fa09c1..53bddf665b 100644 --- a/src/include/utils/backend_progress.h +++ b/src/include/utils/backend_progress.h @@ -41,4 +41,4 @@ extern void pgstat_progress_update_multi_param(int nparam, const int *index, extern void pgstat_progress_end_command(void); -#endif /* BACKEND_PROGRESS_H */ +#endif /* BACKEND_PROGRESS_H */ diff --git a/src/include/utils/backend_status.h b/src/include/utils/backend_status.h index 0cbcc9c943..8042b817df 100644 --- a/src/include/utils/backend_status.h +++ b/src/include/utils/backend_status.h @@ -12,7 +12,7 @@ #include "datatype/timestamp.h" #include "libpq/pqcomm.h" -#include "miscadmin.h" /* for BackendType */ +#include "miscadmin.h" /* for BackendType */ #include "utils/backend_progress.h" @@ -273,7 +273,7 @@ extern PGDLLIMPORT int pgstat_track_activity_query_size; * Other global variables * ---------- */ -extern PGDLLIMPORT PgBackendStatus *MyBEEntry; +extern PGDLLIMPORT PgBackendStatus *MyBEEntry; /* ---------- @@ -318,4 +318,4 @@ extern LocalPgBackendStatus *pgstat_fetch_stat_local_beentry(int beid); extern char *pgstat_clip_activity(const char *raw_activity); -#endif /* BACKEND_STATUS_H */ +#endif /* BACKEND_STATUS_H */ diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index 27d2f2ffb3..f3ce4fb173 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -35,18 +35,18 @@ extern int errdomainconstraint(Oid datatypeOid, const char *conname); extern int2vector *buildint2vector(const int16 *int2s, int n); /* name.c */ -extern void namestrcpy(Name name, const char *str); +extern void namestrcpy(Name name, const char *str); extern int namestrcmp(Name name, const char *str); /* numutils.c */ extern int32 pg_atoi(const char *s, int size, int c); extern int16 pg_strtoint16(const char *s); extern int32 pg_strtoint32(const char *s); -extern int pg_itoa(int16 i, char *a); -extern int pg_ultoa_n(uint32 l, char *a); -extern int pg_ulltoa_n(uint64 l, char *a); -extern int pg_ltoa(int32 l, char *a); -extern int pg_lltoa(int64 ll, char *a); +extern int pg_itoa(int16 i, char *a); +extern int pg_ultoa_n(uint32 l, char *a); +extern int pg_ulltoa_n(uint64 l, char *a); +extern int pg_ltoa(int32 l, char *a); +extern int pg_lltoa(int64 ll, char *a); extern char *pg_ultostr_zeropad(char *str, uint32 value, int32 minwidth); extern char *pg_ultostr(char *str, uint32 value); extern uint64 pg_strtouint64(const char *str, char **endptr, int base); diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h index 78cde58acc..9dd444e1ff 100644 --- a/src/include/utils/selfuncs.h +++ b/src/include/utils/selfuncs.h @@ -79,7 +79,7 @@ typedef struct EstimationInfo { - uint32 flags; /* Flags, as defined above to mark special + uint32 flags; /* Flags, as defined above to mark special * properties of the estimation. */ } EstimationInfo; diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h index 47accc5ffe..6c6ec2e711 100644 --- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -281,4 +281,4 @@ pgstat_report_wait_end(void) } -#endif /* WAIT_EVENT_H */ +#endif /* WAIT_EVENT_H */ diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index 9d861b428b..13e0f8cf9c 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -379,6 +379,7 @@ main(int argc, char *const argv[]) for (list = g_declared_list; list != NULL;) { struct declared_list *this = list; + list = list->next; free(this); } diff --git a/src/interfaces/ecpg/preproc/parse.pl b/src/interfaces/ecpg/preproc/parse.pl index e46d2a589b..1e24801a6f 100644 --- a/src/interfaces/ecpg/preproc/parse.pl +++ b/src/interfaces/ecpg/preproc/parse.pl @@ -63,19 +63,19 @@ my %replace_types = ( 'opt_array_bounds' => '', # "ignore" means: do not create type and rules for this non-term-id - 'parse_toplevel' => 'ignore', - 'stmtmulti' => 'ignore', - 'CreateAsStmt' => 'ignore', - 'DeallocateStmt' => 'ignore', - 'ColId' => 'ignore', - 'type_function_name' => 'ignore', - 'ColLabel' => 'ignore', - 'Sconst' => 'ignore', + 'parse_toplevel' => 'ignore', + 'stmtmulti' => 'ignore', + 'CreateAsStmt' => 'ignore', + 'DeallocateStmt' => 'ignore', + 'ColId' => 'ignore', + 'type_function_name' => 'ignore', + 'ColLabel' => 'ignore', + 'Sconst' => 'ignore', 'opt_distinct_clause' => 'ignore', - 'PLpgSQL_Expr' => 'ignore', - 'PLAssignStmt' => 'ignore', - 'plassign_target' => 'ignore', - 'plassign_equals' => 'ignore',); + 'PLpgSQL_Expr' => 'ignore', + 'PLAssignStmt' => 'ignore', + 'plassign_target' => 'ignore', + 'plassign_equals' => 'ignore',); # these replace_line commands excise certain keywords from the core keyword # lists. Be sure to account for these in ColLabel and related productions. diff --git a/src/interfaces/libpq/fe-secure-openssl.c b/src/interfaces/libpq/fe-secure-openssl.c index 6f357dfbfe..00d43f3eff 100644 --- a/src/interfaces/libpq/fe-secure-openssl.c +++ b/src/interfaces/libpq/fe-secure-openssl.c @@ -943,8 +943,8 @@ initialize_SSL(PGconn *conn) if ((cvstore = SSL_CTX_get_cert_store(SSL_context)) != NULL) { - char *fname = NULL; - char *dname = NULL; + char *fname = NULL; + char *dname = NULL; if (conn->sslcrl && strlen(conn->sslcrl) > 0) fname = conn->sslcrl; @@ -1467,8 +1467,8 @@ pgtls_close(PGconn *conn) { /* * In the non-SSL case, just remove the crypto callbacks if the - * connection has then loaded. This code path has no dependency - * on any pending SSL calls. + * connection has then loaded. This code path has no dependency on + * any pending SSL calls. */ if (conn->crypto_loaded) destroy_needed = true; diff --git a/src/interfaces/libpq/fe-trace.c b/src/interfaces/libpq/fe-trace.c index 37ec06fc4d..ed4247be67 100644 --- a/src/interfaces/libpq/fe-trace.c +++ b/src/interfaces/libpq/fe-trace.c @@ -644,7 +644,7 @@ pqTraceOutputMessage(PGconn *conn, const char *message, bool toServer) if (!toServer) pqTraceOutputS(conn->Pfdebug, message, &logCursor); else - fprintf(conn->Pfdebug, "Sync"); /* no message content */ + fprintf(conn->Pfdebug, "Sync"); /* no message content */ break; case 't': /* Parameter Description */ pqTraceOutputt(conn->Pfdebug, message, &logCursor, regress); diff --git a/src/port/preadv.c b/src/port/preadv.c index 29c808cd0c..eb153ca502 100644 --- a/src/port/preadv.c +++ b/src/port/preadv.c @@ -35,8 +35,8 @@ pg_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset) return -1; return readv(fd, iov, iovcnt); #else - ssize_t sum = 0; - ssize_t part; + ssize_t sum = 0; + ssize_t part; for (int i = 0; i < iovcnt; ++i) { diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 17d686e702..427a360198 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -141,7 +141,8 @@ delete $ENV{"PGCHANNELBINDING"}; $ENV{"PGPASSFILE"} = $pgpassfile; unlink($pgpassfile); -append_to_file($pgpassfile, qq! +append_to_file( + $pgpassfile, qq! # This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. This very long comment is just here to exercise handling of long lines in the file. *:*:postgres:scram_role:pass:this is not part of the password. !); @@ -151,8 +152,9 @@ reset_pg_hba($node, 'password'); test_role($node, 'scram_role', 'password from pgpass', 0); test_role($node, 'md5_role', 'password from pgpass', 2); -append_to_file($pgpassfile, qq! +append_to_file( + $pgpassfile, qq! *:*:*:md5_role:p\\ass !); -test_role($node, 'md5_role', 'password from pgpass', 0); +test_role($node, 'md5_role', 'password from pgpass', 0); diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl index 0333706438..b5594924ca 100644 --- a/src/test/kerberos/t/001_auth.pl +++ b/src/test/kerberos/t/001_auth.pl @@ -79,8 +79,8 @@ my $kdc_datadir = "${TestLib::tmp_check}/krb5kdc"; my $kdc_pidfile = "${TestLib::tmp_check}/krb5kdc.pid"; my $keytab = "${TestLib::tmp_check}/krb5.keytab"; -my $dbname = 'postgres'; -my $username = 'test1'; +my $dbname = 'postgres'; +my $username = 'test1'; my $application = '001_auth.pl'; note "setting up Kerberos"; @@ -193,9 +193,7 @@ sub test_access my $connstr = $node->connstr('postgres') . " user=$role host=$host hostaddr=$hostaddr $gssencmode"; - my %params = ( - sql => $query, - ); + my %params = (sql => $query,); if (@expect_log_msgs) { diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl index 24446bb384..2664b177ec 100644 --- a/src/test/modules/commit_ts/t/002_standby.pl +++ b/src/test/modules/commit_ts/t/002_standby.pl @@ -11,7 +11,7 @@ use Test::More tests => 4; use PostgresNode; my $bkplabel = 'backup'; -my $primary = get_new_node('primary'); +my $primary = get_new_node('primary'); $primary->init(allows_streaming => 1); $primary->append_conf( diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl index 1d57ecedae..57ab9b1d46 100644 --- a/src/test/modules/commit_ts/t/003_standby_2.pl +++ b/src/test/modules/commit_ts/t/003_standby_2.pl @@ -11,7 +11,7 @@ use Test::More tests => 4; use PostgresNode; my $bkplabel = 'backup'; -my $primary = get_new_node('primary'); +my $primary = get_new_node('primary'); $primary->init(allows_streaming => 1); $primary->append_conf( 'postgresql.conf', qq{ diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index 99a41150a2..8fd6cd45e7 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -26,7 +26,7 @@ mkdir "$TestLib::tmp_check/traces"; for my $testname (@tests) { my @extraargs = ('-r', $numrows); - my $cmptrace = grep(/^$testname$/, + my $cmptrace = grep(/^$testname$/, qw(simple_pipeline multi_pipelines prepared singlerow pipeline_abort transaction disallowed_in_pipeline)) > 0; diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index fcbd18af79..f7088667a4 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -568,8 +568,10 @@ sub backup print "# Taking pg_basebackup $backup_name from node \"$name\"\n"; TestLib::system_or_bail( - 'pg_basebackup', '-D', $backup_path, '-h', - $self->host, '-p', $self->port, '--checkpoint', + 'pg_basebackup', '-D', + $backup_path, '-h', + $self->host, '-p', + $self->port, '--checkpoint', 'fast', '--no-sync', @{ $params{backup_options} }); print "# Backup finished\n"; @@ -713,9 +715,10 @@ sub init_from_backup TestLib::system_or_bail($params{tar_program}, 'xf', $backup_path . '/base.tar', '-C', $data_path); - TestLib::system_or_bail($params{tar_program}, 'xf', - $backup_path . '/pg_wal.tar', - '-C', $data_path . '/pg_wal'); + TestLib::system_or_bail( + $params{tar_program}, 'xf', + $backup_path . '/pg_wal.tar', '-C', + $data_path . '/pg_wal'); } else { @@ -1216,44 +1219,43 @@ sub get_new_node # sub _set_pg_version { - my ($self) = @_; - my $inst = $self->{_install_path}; - my $pg_config = "pg_config"; + my ($self) = @_; + my $inst = $self->{_install_path}; + my $pg_config = "pg_config"; - if (defined $inst) - { - # If the _install_path is invalid, our PATH variables might find an - # unrelated pg_config executable elsewhere. Sanity check the - # directory. - BAIL_OUT("directory not found: $inst") - unless -d $inst; + if (defined $inst) + { + # If the _install_path is invalid, our PATH variables might find an + # unrelated pg_config executable elsewhere. Sanity check the + # directory. + BAIL_OUT("directory not found: $inst") + unless -d $inst; - # If the directory exists but is not the root of a postgresql - # installation, or if the user configured using - # --bindir=$SOMEWHERE_ELSE, we're not going to find pg_config, so - # complain about that, too. - $pg_config = "$inst/bin/pg_config"; - BAIL_OUT("pg_config not found: $pg_config") - unless -e $pg_config; - BAIL_OUT("pg_config not executable: $pg_config") - unless -x $pg_config; + # If the directory exists but is not the root of a postgresql + # installation, or if the user configured using + # --bindir=$SOMEWHERE_ELSE, we're not going to find pg_config, so + # complain about that, too. + $pg_config = "$inst/bin/pg_config"; + BAIL_OUT("pg_config not found: $pg_config") + unless -e $pg_config; + BAIL_OUT("pg_config not executable: $pg_config") + unless -x $pg_config; - # Leave $pg_config install_path qualified, to be sure we get the right - # version information, below, or die trying - } + # Leave $pg_config install_path qualified, to be sure we get the right + # version information, below, or die trying + } - local %ENV = $self->_get_env(); + local %ENV = $self->_get_env(); - # We only want the version field - open my $fh, "-|", $pg_config, "--version" - or - BAIL_OUT("$pg_config failed: $!"); - my $version_line = <$fh>; - close $fh or die; + # We only want the version field + open my $fh, "-|", $pg_config, "--version" + or BAIL_OUT("$pg_config failed: $!"); + my $version_line = <$fh>; + close $fh or die; - $self->{_pg_version} = PostgresVersion->new($version_line); + $self->{_pg_version} = PostgresVersion->new($version_line); - BAIL_OUT("could not parse pg_config --version output: $version_line") + BAIL_OUT("could not parse pg_config --version output: $version_line") unless defined $self->{_pg_version}; } @@ -1277,7 +1279,7 @@ sub _set_pg_version # a common parent directory. sub _get_env { - my $self = shift; + my $self = shift; my %inst_env = (%ENV, PGHOST => $self->{_host}, PGPORT => $self->{_port}); # the remaining arguments are modifications to make to the environment my %mods = (@_); @@ -1338,17 +1340,17 @@ sub _get_env # caching a command. sub installed_command { - my ($self, $cmd) = @_; + my ($self, $cmd) = @_; - # Nodes using alternate installation locations use their installation's - # bin/ directory explicitly - return join('/', $self->{_install_path}, 'bin', $cmd) - if defined $self->{_install_path}; + # Nodes using alternate installation locations use their installation's + # bin/ directory explicitly + return join('/', $self->{_install_path}, 'bin', $cmd) + if defined $self->{_install_path}; - # Nodes implicitly using the default installation location rely on IPC::Run - # to find the right binary, which should not cause %cmd_cache confusion, - # because no nodes with other installation paths do it that way. - return $cmd; + # Nodes implicitly using the default installation location rely on IPC::Run + # to find the right binary, which should not cause %cmd_cache confusion, + # because no nodes with other installation paths do it that way. + return $cmd; } =pod @@ -1402,9 +1404,9 @@ sub get_free_port if ($found == 1) { foreach my $addr (qw(127.0.0.1), - ($use_tcp && $TestLib::windows_os) - ? qw(127.0.0.2 127.0.0.3 0.0.0.0) - : ()) + ($use_tcp && $TestLib::windows_os) + ? qw(127.0.0.2 127.0.0.3 0.0.0.0) + : ()) { if (!can_bind($addr, $port)) { @@ -1650,8 +1652,9 @@ sub psql } $psql_connstr .= defined $replication ? " replication=$replication" : ""; - my @psql_params = ($self->installed_command('psql'), - '-XAtq', '-d', $psql_connstr, '-f', '-'); + my @psql_params = ( + $self->installed_command('psql'), + '-XAtq', '-d', $psql_connstr, '-f', '-'); # If the caller wants an array and hasn't passed stdout/stderr # references, allocate temporary ones to capture them so we @@ -1914,8 +1917,9 @@ sub interactive_psql local %ENV = $self->_get_env(); - my @psql_params = ($self->installed_command('psql'), - '-XAt', '-d', $self->connstr($dbname)); + my @psql_params = ( + $self->installed_command('psql'), + '-XAt', '-d', $self->connstr($dbname)); push @psql_params, @{ $params{extra_params} } if defined $params{extra_params}; @@ -2020,8 +2024,7 @@ sub connect_ok } if (@log_like or @log_unlike) { - my $log_contents = TestLib::slurp_file($self->logfile, - $log_location); + my $log_contents = TestLib::slurp_file($self->logfile, $log_location); while (my $regex = shift @log_like) { @@ -2091,8 +2094,7 @@ sub connect_fails if (@log_like or @log_unlike) { - my $log_contents = TestLib::slurp_file($self->logfile, - $log_location); + my $log_contents = TestLib::slurp_file($self->logfile, $log_location); while (my $regex = shift @log_like) { @@ -2125,8 +2127,10 @@ sub poll_query_until $expected = 't' unless defined($expected); # default value - my $cmd = [ $self->installed_command('psql'), - '-XAt', '-c', $query, '-d', $self->connstr($dbname) ]; + my $cmd = [ + $self->installed_command('psql'), + '-XAt', '-c', $query, '-d', $self->connstr($dbname) + ]; my ($stdout, $stderr); my $max_attempts = 180 * 10; my $attempts = 0; @@ -2547,8 +2551,7 @@ sub pg_recvlogical_upto my @cmd = ( $self->installed_command('pg_recvlogical'), - '-S', $slot_name, '--dbname', - $self->connstr($dbname)); + '-S', $slot_name, '--dbname', $self->connstr($dbname)); push @cmd, '--endpos', $endpos; push @cmd, '-f', '-', '--no-loop', '--start'; diff --git a/src/test/perl/PostgresVersion.pm b/src/test/perl/PostgresVersion.pm index 55984ec7e8..4e764c36a5 100644 --- a/src/test/perl/PostgresVersion.pm +++ b/src/test/perl/PostgresVersion.pm @@ -78,9 +78,9 @@ sub new # Accept standard formats, in case caller has handed us the output of a # postgres command line tool my $devel; - ($arg,$devel) = ($1, $2) - if ($arg =~ - m!^ # beginning of line + ($arg, $devel) = ($1, $2) + if ( + $arg =~ m!^ # beginning of line (?:\(?PostgreSQL\)?\s)? # ignore PostgreSQL marker (\d+(?:\.\d+)*) # version number, dotted notation (devel|(?:alpha|beta|rc)\d+)? # dev marker - see version_stamp.pl @@ -95,7 +95,7 @@ sub new $devel ||= ""; - return bless { str => "$arg$devel", num => \@numbers }, $class; + return bless { str => "$arg$devel", num => \@numbers }, $class; } # Routine which compares the _pg_version_array obtained for the two @@ -129,7 +129,7 @@ sub _version_cmp # Render the version number using the saved string. sub _stringify { - my $self = shift; + my $self = shift; return $self->{str}; } diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index 000eb0df1c..d6c3eb8723 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -126,7 +126,8 @@ BEGIN if ($windows_os) { require Win32API::File; - Win32API::File->import(qw(createFile OsFHandleOpen CloseHandle setFilePointer)); + Win32API::File->import( + qw(createFile OsFHandleOpen CloseHandle setFilePointer)); } # Specifies whether to use Unix sockets for test setups. On @@ -165,7 +166,7 @@ INIT # TESTDIR environment variable, which is normally set by the invoking # Makefile. $tmp_check = $ENV{TESTDIR} ? "$ENV{TESTDIR}/tmp_check" : "tmp_check"; - $log_path = "$tmp_check/log"; + $log_path = "$tmp_check/log"; mkdir $tmp_check; mkdir $log_path; @@ -739,7 +740,7 @@ sub command_exit_is # long as the process was not terminated by an exception. To work around # that, use $h->full_results on Windows instead. my $result = - ($Config{osname} eq "MSWin32") + ($Config{osname} eq "MSWin32") ? ($h->full_results)[0] : $h->result(0); is($result, $expected, $test_name); diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl index 7ce67d2b20..df6fdc20d1 100644 --- a/src/test/recovery/t/001_stream_rep.pl +++ b/src/test/recovery/t/001_stream_rep.pl @@ -81,12 +81,12 @@ sub test_target_session_attrs my $mode = shift; my $status = shift; - my $node1_host = $node1->host; - my $node1_port = $node1->port; - my $node1_name = $node1->name; - my $node2_host = $node2->host; - my $node2_port = $node2->port; - my $node2_name = $node2->name; + my $node1_host = $node1->host; + my $node1_port = $node1->port; + my $node1_name = $node1->name; + my $node2_host = $node2->host; + my $node2_port = $node2->port; + my $node2_name = $node2->name; my $target_port = undef; $target_port = $target_node->port if (defined $target_node); my $target_name = undef; @@ -202,8 +202,8 @@ $node_primary->psql( 'postgres', " CREATE ROLE repl_role REPLICATION LOGIN; GRANT pg_read_all_settings TO repl_role;"); -my $primary_host = $node_primary->host; -my $primary_port = $node_primary->port; +my $primary_host = $node_primary->host; +my $primary_port = $node_primary->port; my $connstr_common = "host=$primary_host port=$primary_port user=repl_role"; my $connstr_rep = "$connstr_common replication=1"; my $connstr_db = "$connstr_common replication=database dbname=postgres"; diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl index 4da7ed970e..84e977bd6d 100644 --- a/src/test/recovery/t/003_recovery_targets.pl +++ b/src/test/recovery/t/003_recovery_targets.pl @@ -16,7 +16,7 @@ sub test_recovery_standby { my $test_name = shift; my $node_name = shift; - my $node_primary = shift; + my $node_primary = shift; my $recovery_params = shift; my $num_rows = shift; my $until_lsn = shift; diff --git a/src/test/recovery/t/007_sync_rep.pl b/src/test/recovery/t/007_sync_rep.pl index ad3fb1b44c..81098dcf00 100644 --- a/src/test/recovery/t/007_sync_rep.pl +++ b/src/test/recovery/t/007_sync_rep.pl @@ -36,7 +36,7 @@ sub test_sync_state sub start_standby_and_wait { my ($primary, $standby) = @_; - my $primary_name = $primary->name; + my $primary_name = $primary->name; my $standby_name = $standby->name; my $query = "SELECT count(1) = 1 FROM pg_stat_replication WHERE application_name = '$standby_name'"; diff --git a/src/test/recovery/t/011_crash_recovery.pl b/src/test/recovery/t/011_crash_recovery.pl index 0e5059db99..a26e99500b 100644 --- a/src/test/recovery/t/011_crash_recovery.pl +++ b/src/test/recovery/t/011_crash_recovery.pl @@ -61,4 +61,4 @@ is($node->safe_psql('postgres', qq[SELECT pg_xact_status('$xid');]), 'aborted', 'xid is aborted after crash'); $stdin .= "\\q\n"; -$tx->finish; # wait for psql to quit gracefully +$tx->finish; # wait for psql to quit gracefully diff --git a/src/test/recovery/t/021_row_visibility.pl b/src/test/recovery/t/021_row_visibility.pl index 2d0f055629..fcff0a2feb 100644 --- a/src/test/recovery/t/021_row_visibility.pl +++ b/src/test/recovery/t/021_row_visibility.pl @@ -41,122 +41,131 @@ my $psql_timeout = IPC::Run::timer(300); # One psql to primary and standby each, for all queries. That allows # to check uncommitted changes being replicated and such. my %psql_primary = (stdin => '', stdout => '', stderr => ''); -$psql_primary{run} = - IPC::Run::start( - ['psql', '-XA', '-f', '-', '-d', $node_primary->connstr('postgres')], - '<', \$psql_primary{stdin}, - '>', \$psql_primary{stdout}, - '2>', \$psql_primary{stderr}, - $psql_timeout); +$psql_primary{run} = IPC::Run::start( + [ 'psql', '-XA', '-f', '-', '-d', $node_primary->connstr('postgres') ], + '<', + \$psql_primary{stdin}, + '>', + \$psql_primary{stdout}, + '2>', + \$psql_primary{stderr}, + $psql_timeout); my %psql_standby = ('stdin' => '', 'stdout' => '', 'stderr' => ''); -$psql_standby{run} = - IPC::Run::start( - ['psql', '-XA', '-f', '-', '-d', $node_standby->connstr('postgres')], - '<', \$psql_standby{stdin}, - '>', \$psql_standby{stdout}, - '2>', \$psql_standby{stderr}, - $psql_timeout); +$psql_standby{run} = IPC::Run::start( + [ 'psql', '-XA', '-f', '-', '-d', $node_standby->connstr('postgres') ], + '<', + \$psql_standby{stdin}, + '>', + \$psql_standby{stdout}, + '2>', + \$psql_standby{stderr}, + $psql_timeout); # # 1. Check initial data is the same # -ok(send_query_and_wait(\%psql_standby, - q/SELECT * FROM test_visibility ORDER BY data;/, - qr/^\(0 rows\)$/m), - 'data not visible'); +ok( send_query_and_wait( + \%psql_standby, + q/SELECT * FROM test_visibility ORDER BY data;/, + qr/^\(0 rows\)$/m), + 'data not visible'); # # 2. Check if an INSERT is replayed and visible # -$node_primary->psql('postgres', "INSERT INTO test_visibility VALUES ('first insert')"); +$node_primary->psql('postgres', + "INSERT INTO test_visibility VALUES ('first insert')"); $node_primary->wait_for_catchup($node_standby, 'replay', $node_primary->lsn('insert')); -ok(send_query_and_wait(\%psql_standby, - q[SELECT * FROM test_visibility ORDER BY data;], - qr/first insert.*\n\(1 row\)/m), - 'insert visible'); +ok( send_query_and_wait( + \%psql_standby, + q[SELECT * FROM test_visibility ORDER BY data;], + qr/first insert.*\n\(1 row\)/m), + 'insert visible'); # # 3. Verify that uncommitted changes aren't visible. # -ok(send_query_and_wait(\%psql_primary, - q[ +ok( send_query_and_wait( + \%psql_primary, + q[ BEGIN; UPDATE test_visibility SET data = 'first update' RETURNING data; ], - qr/^UPDATE 1$/m), - 'UPDATE'); + qr/^UPDATE 1$/m), + 'UPDATE'); -$node_primary->psql('postgres', "SELECT txid_current();"); # ensure WAL flush +$node_primary->psql('postgres', "SELECT txid_current();"); # ensure WAL flush $node_primary->wait_for_catchup($node_standby, 'replay', - $node_primary->lsn('insert')); + $node_primary->lsn('insert')); -ok(send_query_and_wait(\%psql_standby, - q[SELECT * FROM test_visibility ORDER BY data;], - qr/first insert.*\n\(1 row\)/m), - 'uncommitted update invisible'); +ok( send_query_and_wait( + \%psql_standby, + q[SELECT * FROM test_visibility ORDER BY data;], + qr/first insert.*\n\(1 row\)/m), + 'uncommitted update invisible'); # # 4. That a commit turns 3. visible # -ok(send_query_and_wait(\%psql_primary, - q[COMMIT;], - qr/^COMMIT$/m), - 'COMMIT'); +ok(send_query_and_wait(\%psql_primary, q[COMMIT;], qr/^COMMIT$/m), 'COMMIT'); $node_primary->wait_for_catchup($node_standby, 'replay', $node_primary->lsn('insert')); -ok(send_query_and_wait(\%psql_standby, - q[SELECT * FROM test_visibility ORDER BY data;], - qr/first update\n\(1 row\)$/m), - 'committed update visible'); +ok( send_query_and_wait( + \%psql_standby, + q[SELECT * FROM test_visibility ORDER BY data;], + qr/first update\n\(1 row\)$/m), + 'committed update visible'); # # 5. Check that changes in prepared xacts is invisible # -ok(send_query_and_wait(\%psql_primary, q[ +ok( send_query_and_wait( + \%psql_primary, q[ DELETE from test_visibility; -- delete old data, so we start with clean slate BEGIN; INSERT INTO test_visibility VALUES('inserted in prepared will_commit'); PREPARE TRANSACTION 'will_commit';], - qr/^PREPARE TRANSACTION$/m), - 'prepared will_commit'); + qr/^PREPARE TRANSACTION$/m), + 'prepared will_commit'); -ok(send_query_and_wait(\%psql_primary, q[ +ok( send_query_and_wait( + \%psql_primary, q[ BEGIN; INSERT INTO test_visibility VALUES('inserted in prepared will_abort'); PREPARE TRANSACTION 'will_abort'; ], - qr/^PREPARE TRANSACTION$/m), - 'prepared will_abort'); + qr/^PREPARE TRANSACTION$/m), + 'prepared will_abort'); -$node_primary->wait_for_catchup($node_standby, 'replay', - $node_primary->lsn('insert')); - -ok(send_query_and_wait(\%psql_standby, - q[SELECT * FROM test_visibility ORDER BY data;], - qr/^\(0 rows\)$/m), - 'uncommitted prepared invisible'); - -# For some variation, finish prepared xacts via separate connections -$node_primary->safe_psql('postgres', - "COMMIT PREPARED 'will_commit';"); -$node_primary->safe_psql('postgres', - "ROLLBACK PREPARED 'will_abort';"); $node_primary->wait_for_catchup($node_standby, 'replay', $node_primary->lsn('insert')); -ok(send_query_and_wait(\%psql_standby, - q[SELECT * FROM test_visibility ORDER BY data;], - qr/will_commit.*\n\(1 row\)$/m), - 'finished prepared visible'); +ok( send_query_and_wait( + \%psql_standby, + q[SELECT * FROM test_visibility ORDER BY data;], + qr/^\(0 rows\)$/m), + 'uncommitted prepared invisible'); + +# For some variation, finish prepared xacts via separate connections +$node_primary->safe_psql('postgres', "COMMIT PREPARED 'will_commit';"); +$node_primary->safe_psql('postgres', "ROLLBACK PREPARED 'will_abort';"); +$node_primary->wait_for_catchup($node_standby, 'replay', + $node_primary->lsn('insert')); + +ok( send_query_and_wait( + \%psql_standby, + q[SELECT * FROM test_visibility ORDER BY data;], + qr/will_commit.*\n\(1 row\)$/m), + 'finished prepared visible'); # explicitly shut down psql instances gracefully - to avoid hangs # or worse on windows -$psql_primary{stdin} .= "\\q\n"; +$psql_primary{stdin} .= "\\q\n"; $psql_primary{run}->finish; $psql_standby{stdin} .= "\\q\n"; $psql_standby{run}->finish; @@ -185,16 +194,16 @@ sub send_query_and_wait if ($psql_timeout->is_expired) { - BAIL_OUT("aborting wait: program timed out\n". - "stream contents: >>$$psql{stdout}<<\n". - "pattern searched for: $untl\n"); + BAIL_OUT("aborting wait: program timed out\n" + . "stream contents: >>$$psql{stdout}<<\n" + . "pattern searched for: $untl\n"); return 0; } if (not $$psql{run}->pumpable()) { - BAIL_OUT("aborting wait: program died\n". - "stream contents: >>$$psql{stdout}<<\n". - "pattern searched for: $untl\n"); + BAIL_OUT("aborting wait: program died\n" + . "stream contents: >>$$psql{stdout}<<\n" + . "pattern searched for: $untl\n"); return 0; } $$psql{run}->pump(); diff --git a/src/test/recovery/t/022_crash_temp_files.pl b/src/test/recovery/t/022_crash_temp_files.pl index 42c3cfc027..b912f4b232 100644 --- a/src/test/recovery/t/022_crash_temp_files.pl +++ b/src/test/recovery/t/022_crash_temp_files.pl @@ -41,9 +41,7 @@ $node->safe_psql( SELECT pg_reload_conf();]); # create table, insert rows -$node->safe_psql( - 'postgres', - q[CREATE TABLE tab_crash (a integer UNIQUE);]); +$node->safe_psql('postgres', q[CREATE TABLE tab_crash (a integer UNIQUE);]); # Run psql, keeping session alive, so we have an alive backend to kill. my ($killme_stdin, $killme_stdout, $killme_stderr) = ('', '', ''); @@ -118,7 +116,8 @@ DECLARE c INT; BEGIN LOOP - SELECT COUNT(*) INTO c FROM pg_locks WHERE pid = ] . $pid . q[ AND NOT granted; + SELECT COUNT(*) INTO c FROM pg_locks WHERE pid = ] . $pid + . q[ AND NOT granted; IF c > 0 THEN EXIT; END IF; @@ -143,10 +142,10 @@ $killme2->finish; $node->poll_query_until('postgres', 'SELECT 1', '1'); # Check for temporary files -is($node->safe_psql( - 'postgres', - 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), - qq(0), 'no temporary files'); +is( $node->safe_psql( + 'postgres', 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), + qq(0), + 'no temporary files'); # # Test old behavior (don't remove temporary files after crash) @@ -206,7 +205,8 @@ DECLARE c INT; BEGIN LOOP - SELECT COUNT(*) INTO c FROM pg_locks WHERE pid = ] . $pid . q[ AND NOT granted; + SELECT COUNT(*) INTO c FROM pg_locks WHERE pid = ] . $pid + . q[ AND NOT granted; IF c > 0 THEN EXIT; END IF; @@ -231,19 +231,19 @@ $killme2->finish; $node->poll_query_until('postgres', 'SELECT 1', '1'); # Check for temporary files -- should be there -is($node->safe_psql( - 'postgres', - 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), - qq(1), 'one temporary file'); +is( $node->safe_psql( + 'postgres', 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), + qq(1), + 'one temporary file'); # Restart should remove the temporary files $node->restart(); # Check the temporary files -- should be gone -is($node->safe_psql( - 'postgres', - 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), - qq(0), 'temporary file was removed'); +is( $node->safe_psql( + 'postgres', 'SELECT COUNT(1) FROM pg_ls_dir($$base/pgsql_tmp$$)'), + qq(0), + 'temporary file was removed'); $node->stop(); diff --git a/src/test/recovery/t/024_archive_recovery.pl b/src/test/recovery/t/024_archive_recovery.pl index 302c69f96b..f06ed8c8a1 100644 --- a/src/test/recovery/t/024_archive_recovery.pl +++ b/src/test/recovery/t/024_archive_recovery.pl @@ -50,8 +50,8 @@ my $walfile_to_be_archived = $node->safe_psql('postgres', # Make WAL segment eligible for archival $node->safe_psql('postgres', 'SELECT pg_switch_wal()'); -my $archive_wait_query - = "SELECT '$walfile_to_be_archived' <= last_archived_wal FROM pg_stat_archiver;"; +my $archive_wait_query = + "SELECT '$walfile_to_be_archived' <= last_archived_wal FROM pg_stat_archiver;"; # Wait until the WAL segment has been archived. $node->poll_query_until('postgres', $archive_wait_query) @@ -69,13 +69,17 @@ sub test_recovery_wal_level_minimal my $recovery_node = get_new_node($node_name); $recovery_node->init_from_backup( $node, $backup_name, - has_restoring => 1, standby => $standby_setting); + has_restoring => 1, + standby => $standby_setting); # Use run_log instead of recovery_node->start because this test expects # that the server ends with an error during recovery. run_log( - ['pg_ctl','-D', $recovery_node->data_dir, '-l', - $recovery_node->logfile, 'start']); + [ + 'pg_ctl', '-D', + $recovery_node->data_dir, '-l', + $recovery_node->logfile, 'start' + ]); # Wait up to 180s for postgres to terminate foreach my $i (0 .. 1800) @@ -87,8 +91,9 @@ sub test_recovery_wal_level_minimal # Confirm that the archive recovery fails with an expected error my $logfile = slurp_file($recovery_node->logfile()); ok( $logfile =~ - qr/FATAL: .* WAL was generated with wal_level=minimal, cannot continue recovering/, - "$node_text ends with an error because it finds WAL generated with wal_level=minimal"); + qr/FATAL: .* WAL was generated with wal_level=minimal, cannot continue recovering/, + "$node_text ends with an error because it finds WAL generated with wal_level=minimal" + ); } # Test for archive recovery diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index d8756e5ba0..351d79e1f0 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -824,7 +824,7 @@ test_spinlock(void) char data_before[4]; slock_t lock; char data_after[4]; - } struct_w_lock; + } struct_w_lock; memcpy(struct_w_lock.data_before, "abcd", 4); memcpy(struct_w_lock.data_after, "ef12", 4); @@ -872,28 +872,28 @@ test_spinlock(void) } /* - * Ensure that allocating more than INT32_MAX emulated spinlocks - * works. That's interesting because the spinlock emulation uses a 32bit - * integer to map spinlocks onto semaphores. There've been bugs... + * Ensure that allocating more than INT32_MAX emulated spinlocks works. + * That's interesting because the spinlock emulation uses a 32bit integer + * to map spinlocks onto semaphores. There've been bugs... */ #ifndef HAVE_SPINLOCKS { /* - * Initialize enough spinlocks to advance counter close to - * wraparound. It's too expensive to perform acquire/release for each, - * as those may be syscalls when the spinlock emulation is used (and - * even just atomic TAS would be expensive). + * Initialize enough spinlocks to advance counter close to wraparound. + * It's too expensive to perform acquire/release for each, as those + * may be syscalls when the spinlock emulation is used (and even just + * atomic TAS would be expensive). */ for (uint32 i = 0; i < INT32_MAX - 100000; i++) { - slock_t lock; + slock_t lock; SpinLockInit(&lock); } for (uint32 i = 0; i < 200000; i++) { - slock_t lock; + slock_t lock; SpinLockInit(&lock); @@ -923,7 +923,7 @@ test_spinlock(void) static void test_atomic_spin_nest(void) { - slock_t lock; + slock_t lock; #define NUM_TEST_ATOMICS (NUM_SPINLOCK_SEMAPHORES + NUM_ATOMICS_SEMAPHORES + 27) pg_atomic_uint32 atomics32[NUM_TEST_ATOMICS]; pg_atomic_uint64 atomics64[NUM_TEST_ATOMICS]; diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 45acb1687c..44daefb002 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -41,8 +41,8 @@ my $common_connstr; # This changes ssl/client.key to ssl/client_tmp.key etc for the rest # of the tests. my @keys = ( - "client", "client-revoked", - "client-der", "client-encrypted-pem", + "client", "client-revoked", + "client-der", "client-encrypted-pem", "client-encrypted-der", "client-dn"); foreach my $key (@keys) { diff --git a/src/test/ssl/t/SSLServer.pm b/src/test/ssl/t/SSLServer.pm index 0ca2bebf2b..804d008245 100644 --- a/src/test/ssl/t/SSLServer.pm +++ b/src/test/ssl/t/SSLServer.pm @@ -139,13 +139,13 @@ sub switch_server_cert my $cafile = $_[2] || "root+client_ca"; my $crlfile = "root+client.crl"; my $crldir; - my $pgdata = $node->data_dir; + my $pgdata = $node->data_dir; # defaults to use crl file if (defined $_[3] || defined $_[4]) { $crlfile = $_[3]; - $crldir = $_[4]; + $crldir = $_[4]; } open my $sslconf, '>', "$pgdata/sslconfig.conf"; @@ -154,7 +154,7 @@ sub switch_server_cert print $sslconf "ssl_cert_file='$certfile.crt'\n"; print $sslconf "ssl_key_file='$certfile.key'\n"; print $sslconf "ssl_crl_file='$crlfile'\n" if defined $crlfile; - print $sslconf "ssl_crl_dir='$crldir'\n" if defined $crldir; + print $sslconf "ssl_crl_dir='$crldir'\n" if defined $crldir; close $sslconf; $node->restart; diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl index 46a88b6d30..1f654ee6af 100644 --- a/src/test/subscription/t/001_rep_changes.pl +++ b/src/test/subscription/t/001_rep_changes.pl @@ -164,7 +164,8 @@ $node_publisher->safe_psql('postgres', # from the publication. $result = $node_subscriber->safe_psql('postgres', "SELECT count(*), min(a), max(a) FROM tab_ins"); -is($result, qq(1052|1|1002), 'check rows on subscriber before table drop from publication'); +is($result, qq(1052|1|1002), + 'check rows on subscriber before table drop from publication'); # Drop the table from publication $node_publisher->safe_psql('postgres', @@ -179,7 +180,8 @@ $node_publisher->wait_for_catchup('tap_sub'); # publication, so row count should remain the same. $result = $node_subscriber->safe_psql('postgres', "SELECT count(*), min(a), max(a) FROM tab_ins"); -is($result, qq(1052|1|1002), 'check rows on subscriber after table drop from publication'); +is($result, qq(1052|1|1002), + 'check rows on subscriber after table drop from publication'); # Delete the inserted row in publisher $node_publisher->safe_psql('postgres', "DELETE FROM tab_ins WHERE a = 8888"); @@ -205,7 +207,8 @@ $node_subscriber->safe_psql('postgres', "CREATE TABLE temp2 (a int)"); # Setup logical replication that will only be used for this test $node_publisher->safe_psql('postgres', - "CREATE PUBLICATION tap_pub_temp1 FOR TABLE temp1 WITH (publish = insert)"); + "CREATE PUBLICATION tap_pub_temp1 FOR TABLE temp1 WITH (publish = insert)" +); $node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub_temp2 FOR TABLE temp2"); $node_subscriber->safe_psql('postgres', @@ -221,9 +224,10 @@ $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; # Subscriber table will have no rows initially -$result = $node_subscriber->safe_psql('postgres', - "SELECT count(*) FROM temp1"); -is($result, qq(0), 'check initial rows on subscriber with multiple publications'); +$result = + $node_subscriber->safe_psql('postgres', "SELECT count(*) FROM temp1"); +is($result, qq(0), + 'check initial rows on subscriber with multiple publications'); # Insert a row into the table that's part of first publication in subscriber # list of publications. @@ -232,8 +236,8 @@ $node_publisher->safe_psql('postgres', "INSERT INTO temp1 VALUES (1)"); $node_publisher->wait_for_catchup('tap_sub_temp1'); # Subscriber should receive the inserted row -$result = $node_subscriber->safe_psql('postgres', - "SELECT count(*) FROM temp1"); +$result = + $node_subscriber->safe_psql('postgres', "SELECT count(*) FROM temp1"); is($result, qq(1), 'check rows on subscriber with multiple publications'); # Drop subscription as we don't need it anymore diff --git a/src/test/subscription/t/004_sync.pl b/src/test/subscription/t/004_sync.pl index f4afdc241d..b3c91af21d 100644 --- a/src/test/subscription/t/004_sync.pl +++ b/src/test/subscription/t/004_sync.pl @@ -161,17 +161,20 @@ $node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub"); # at this time. Recreate the subscription which will do the initial copy of # the table again and fails due to unique constraint violation. $node_subscriber->safe_psql('postgres', - "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr' PUBLICATION tap_pub"); + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr' PUBLICATION tap_pub" +); $result = $node_subscriber->poll_query_until('postgres', $started_query) - or die "Timed out while waiting for subscriber to start sync"; + or die "Timed out while waiting for subscriber to start sync"; # DROP SUBSCRIPTION must clean up slots on the publisher side when the # subscriber is stuck on data copy for constraint violation. $node_subscriber->safe_psql('postgres', "DROP SUBSCRIPTION tap_sub"); -$result = $node_publisher->safe_psql('postgres', "SELECT count(*) FROM pg_replication_slots"); -is($result, qq(0), 'DROP SUBSCRIPTION during error can clean up the slots on the publisher'); +$result = $node_publisher->safe_psql('postgres', + "SELECT count(*) FROM pg_replication_slots"); +is($result, qq(0), + 'DROP SUBSCRIPTION during error can clean up the slots on the publisher'); $node_subscriber->stop('fast'); $node_publisher->stop('fast'); diff --git a/src/test/subscription/t/010_truncate.pl b/src/test/subscription/t/010_truncate.pl index cd3f45c192..2d49f2537b 100644 --- a/src/test/subscription/t/010_truncate.pl +++ b/src/test/subscription/t/010_truncate.pl @@ -185,4 +185,5 @@ $node_publisher->wait_for_catchup('sub1'); $result = $node_subscriber->safe_psql('postgres', "SELECT count(*), min(a), max(a) FROM tab1"); -is($result, qq(0||), 'truncate replicated in synchronous logical replication'); +is($result, qq(0||), + 'truncate replicated in synchronous logical replication'); diff --git a/src/test/subscription/t/015_stream.pl b/src/test/subscription/t/015_stream.pl index d76e14c376..6cc8b4a8d2 100644 --- a/src/test/subscription/t/015_stream.pl +++ b/src/test/subscription/t/015_stream.pl @@ -11,7 +11,8 @@ use Test::More tests => 4; # Create publisher node my $node_publisher = get_new_node('publisher'); $node_publisher->init(allows_streaming => 'logical'); -$node_publisher->append_conf('postgresql.conf', 'logical_decoding_work_mem = 64kB'); +$node_publisher->append_conf('postgresql.conf', + 'logical_decoding_work_mem = 64kB'); $node_publisher->start; # Create subscriber node @@ -26,27 +27,31 @@ $node_publisher->safe_psql('postgres', "INSERT INTO test_tab VALUES (1, 'foo'), (2, 'bar')"); # Setup structure on subscriber -$node_subscriber->safe_psql('postgres', "CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999)"); +$node_subscriber->safe_psql('postgres', + "CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999)" +); # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; my $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(2|2|2), 'check initial data was copied to subscriber'); # Interleave a pair of transactions, each exceeding the 64kB limit. @@ -83,16 +88,17 @@ $h->finish; # errors make the next test fail, so ignore them here $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(3334|3334|3334), 'check extra columns contain local defaults'); # Test the streaming in binary mode $node_subscriber->safe_psql('postgres', -"ALTER SUBSCRIPTION tap_sub SET (binary = on)" -); + "ALTER SUBSCRIPTION tap_sub SET (binary = on)"); # Insert, update and delete enough rows to exceed the 64kB limit. -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series(5001, 10000) s(i); UPDATE test_tab SET b = md5(b) WHERE mod(a,2) = 0; @@ -103,21 +109,27 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(6667|6667|6667), 'check extra columns contain local defaults'); # Change the local values of the extra columns on the subscriber, # update publisher, and check that subscriber retains the expected # values. This is to ensure that non-streaming transactions behave # properly after a streaming transaction. -$node_subscriber->safe_psql('postgres', "UPDATE test_tab SET c = 'epoch'::timestamptz + 987654321 * interval '1s'"); -$node_publisher->safe_psql('postgres', "UPDATE test_tab SET b = md5(a::text)"); +$node_subscriber->safe_psql('postgres', + "UPDATE test_tab SET c = 'epoch'::timestamptz + 987654321 * interval '1s'" +); +$node_publisher->safe_psql('postgres', + "UPDATE test_tab SET b = md5(a::text)"); $node_publisher->wait_for_catchup($appname); -$result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(extract(epoch from c) = 987654321), count(d = 999) FROM test_tab"); -is($result, qq(6667|6667|6667), 'check extra columns contain locally changed data'); +$result = $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(extract(epoch from c) = 987654321), count(d = 999) FROM test_tab" +); +is($result, qq(6667|6667|6667), + 'check extra columns contain locally changed data'); $node_subscriber->stop; $node_publisher->stop; diff --git a/src/test/subscription/t/016_stream_subxact.pl b/src/test/subscription/t/016_stream_subxact.pl index 399036f14b..0245b0685b 100644 --- a/src/test/subscription/t/016_stream_subxact.pl +++ b/src/test/subscription/t/016_stream_subxact.pl @@ -11,7 +11,8 @@ use Test::More tests => 2; # Create publisher node my $node_publisher = get_new_node('publisher'); $node_publisher->init(allows_streaming => 'logical'); -$node_publisher->append_conf('postgresql.conf', 'logical_decoding_work_mem = 64kB'); +$node_publisher->append_conf('postgresql.conf', + 'logical_decoding_work_mem = 64kB'); $node_publisher->start; # Create subscriber node @@ -26,31 +27,36 @@ $node_publisher->safe_psql('postgres', "INSERT INTO test_tab VALUES (1, 'foo'), (2, 'bar')"); # Setup structure on subscriber -$node_subscriber->safe_psql('postgres', "CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999)"); +$node_subscriber->safe_psql('postgres', + "CREATE TABLE test_tab (a int primary key, b text, c timestamptz DEFAULT now(), d bigint DEFAULT 999)" +); # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; my $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(2|2|2), 'check initial data was copied to subscriber'); # Insert, update and delete enough rows to exceed 64kB limit. -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series( 3, 500) s(i); UPDATE test_tab SET b = md5(b) WHERE mod(a,2) = 0; @@ -77,8 +83,11 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); -is($result, qq(1667|1667|1667), 'check data was copied to subscriber in streaming mode and extra columns contain local defaults'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); +is($result, qq(1667|1667|1667), + 'check data was copied to subscriber in streaming mode and extra columns contain local defaults' +); $node_subscriber->stop; $node_publisher->stop; diff --git a/src/test/subscription/t/017_stream_ddl.pl b/src/test/subscription/t/017_stream_ddl.pl index 8194a3882a..35b146827d 100644 --- a/src/test/subscription/t/017_stream_ddl.pl +++ b/src/test/subscription/t/017_stream_ddl.pl @@ -11,7 +11,8 @@ use Test::More tests => 3; # Create publisher node my $node_publisher = get_new_node('publisher'); $node_publisher->init(allows_streaming => 'logical'); -$node_publisher->append_conf('postgresql.conf', 'logical_decoding_work_mem = 64kB'); +$node_publisher->append_conf('postgresql.conf', + 'logical_decoding_work_mem = 64kB'); $node_publisher->start; # Create subscriber node @@ -26,31 +27,36 @@ $node_publisher->safe_psql('postgres', "INSERT INTO test_tab VALUES (1, 'foo'), (2, 'bar')"); # Setup structure on subscriber -$node_subscriber->safe_psql('postgres', "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT, f INT)"); +$node_subscriber->safe_psql('postgres', + "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT, f INT)" +); # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; my $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d = 999) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d = 999) FROM test_tab"); is($result, qq(2|0|0), 'check initial data was copied to subscriber'); # a small (non-streamed) transaction with DDL and DML -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab VALUES (3, md5(3::text)); ALTER TABLE test_tab ADD COLUMN c INT; @@ -60,7 +66,8 @@ COMMIT; }); # large (streamed) transaction with DDL and DML -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text), -i FROM generate_series(5, 1000) s(i); ALTER TABLE test_tab ADD COLUMN d INT; @@ -70,7 +77,8 @@ COMMIT; }); # a small (non-streamed) transaction with DDL and DML -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab VALUES (2001, md5(2001::text), -2001, 2*2001); ALTER TABLE test_tab ADD COLUMN e INT; @@ -82,13 +90,17 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d), count(e) FROM test_tab"); -is($result, qq(2002|1999|1002|1), 'check data was copied to subscriber in streaming mode and extra columns contain local defaults'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d), count(e) FROM test_tab"); +is($result, qq(2002|1999|1002|1), + 'check data was copied to subscriber in streaming mode and extra columns contain local defaults' +); # A large (streamed) transaction with DDL and DML. One of the DDL is performed # after DML to ensure that we invalidate the schema sent for test_tab so that # the next transaction has to send the schema again. -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text), -i, 2*i, -3*i FROM generate_series(2003,5000) s(i); ALTER TABLE test_tab ADD COLUMN f INT; @@ -97,7 +109,8 @@ COMMIT; # A small transaction that won't get streamed. This is just to ensure that we # send the schema again to reflect the last column added in the previous test. -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text), -i, 2*i, -3*i, 4*i FROM generate_series(5001,5005) s(i); COMMIT; @@ -106,8 +119,11 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c), count(d), count(e), count(f) FROM test_tab"); -is($result, qq(5005|5002|4005|3004|5), 'check data was copied to subscriber for both streaming and non-streaming transactions'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c), count(d), count(e), count(f) FROM test_tab"); +is($result, qq(5005|5002|4005|3004|5), + 'check data was copied to subscriber for both streaming and non-streaming transactions' +); $node_subscriber->stop; $node_publisher->stop; diff --git a/src/test/subscription/t/018_stream_subxact_abort.pl b/src/test/subscription/t/018_stream_subxact_abort.pl index aafb555ada..7fc60b5bde 100644 --- a/src/test/subscription/t/018_stream_subxact_abort.pl +++ b/src/test/subscription/t/018_stream_subxact_abort.pl @@ -11,7 +11,8 @@ use Test::More tests => 4; # Create publisher node my $node_publisher = get_new_node('publisher'); $node_publisher->init(allows_streaming => 'logical'); -$node_publisher->append_conf('postgresql.conf', 'logical_decoding_work_mem = 64kB'); +$node_publisher->append_conf('postgresql.conf', + 'logical_decoding_work_mem = 64kB'); $node_publisher->start; # Create subscriber node @@ -26,31 +27,35 @@ $node_publisher->safe_psql('postgres', "INSERT INTO test_tab VALUES (1, 'foo'), (2, 'bar')"); # Setup structure on subscriber -$node_subscriber->safe_psql('postgres', "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT)"); +$node_subscriber->safe_psql('postgres', + "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT)"); # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; my $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); is($result, qq(2|0), 'check initial data was copied to subscriber'); # large (streamed) transaction with DDL, DML and ROLLBACKs -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series(3,500) s(i); SAVEPOINT s1; @@ -73,12 +78,16 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); -is($result, qq(2000|0), 'check rollback to savepoint was reflected on subscriber and extra columns contain local defaults'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); +is($result, qq(2000|0), + 'check rollback to savepoint was reflected on subscriber and extra columns contain local defaults' +); # large (streamed) transaction with subscriber receiving out of order # subtransaction ROLLBACKs -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series(4001,4500) s(i); SAVEPOINT s1; @@ -96,11 +105,14 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); -is($result, qq(2500|0), 'check rollback to savepoint was reflected on subscriber'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); +is($result, qq(2500|0), + 'check rollback to savepoint was reflected on subscriber'); # large (streamed) transaction with subscriber receiving rollback -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series(8501,9000) s(i); SAVEPOINT s1; @@ -113,7 +125,8 @@ ROLLBACK; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); is($result, qq(2500|0), 'check rollback was reflected on subscriber'); $node_subscriber->stop; diff --git a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl index 517a26342b..81149b86a9 100644 --- a/src/test/subscription/t/019_stream_subxact_ddl_abort.pl +++ b/src/test/subscription/t/019_stream_subxact_ddl_abort.pl @@ -12,7 +12,8 @@ use Test::More tests => 2; # Create publisher node my $node_publisher = get_new_node('publisher'); $node_publisher->init(allows_streaming => 'logical'); -$node_publisher->append_conf('postgresql.conf', 'logical_decoding_work_mem = 64kB'); +$node_publisher->append_conf('postgresql.conf', + 'logical_decoding_work_mem = 64kB'); $node_publisher->start; # Create subscriber node @@ -27,31 +28,35 @@ $node_publisher->safe_psql('postgres', "INSERT INTO test_tab VALUES (1, 'foo'), (2, 'bar')"); # Setup structure on subscriber -$node_subscriber->safe_psql('postgres', "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT)"); +$node_subscriber->safe_psql('postgres', + "CREATE TABLE test_tab (a int primary key, b text, c INT, d INT, e INT)"); # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE test_tab"); my $appname = 'tap_sub'; $node_subscriber->safe_psql('postgres', -"CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" + "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr application_name=$appname' PUBLICATION tap_pub WITH (streaming = on)" ); $node_publisher->wait_for_catchup($appname); # Also wait for initial table sync to finish my $synced_query = -"SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; + "SELECT count(1) = 0 FROM pg_subscription_rel WHERE srsubstate NOT IN ('r', 's');"; $node_subscriber->poll_query_until('postgres', $synced_query) or die "Timed out while waiting for subscriber to synchronize data"; my $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); is($result, qq(2|0), 'check initial data was copied to subscriber'); # large (streamed) transaction with DDL, DML and ROLLBACKs -$node_publisher->safe_psql('postgres', q{ +$node_publisher->safe_psql( + 'postgres', q{ BEGIN; INSERT INTO test_tab SELECT i, md5(i::text) FROM generate_series(3,500) s(i); ALTER TABLE test_tab ADD COLUMN c INT; @@ -72,8 +77,11 @@ COMMIT; $node_publisher->wait_for_catchup($appname); $result = - $node_subscriber->safe_psql('postgres', "SELECT count(*), count(c) FROM test_tab"); -is($result, qq(1000|500), 'check rollback to savepoint was reflected on subscriber and extra columns contain local defaults'); + $node_subscriber->safe_psql('postgres', + "SELECT count(*), count(c) FROM test_tab"); +is($result, qq(1000|500), + 'check rollback to savepoint was reflected on subscriber and extra columns contain local defaults' +); $node_subscriber->stop; $node_publisher->stop; diff --git a/src/test/subscription/t/020_messages.pl b/src/test/subscription/t/020_messages.pl index e5d48ec8a0..0940d0f45f 100644 --- a/src/test/subscription/t/020_messages.pl +++ b/src/test/subscription/t/020_messages.pl @@ -28,7 +28,8 @@ $node_subscriber->safe_psql('postgres', # Setup logical replication my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres'; -$node_publisher->safe_psql('postgres', "CREATE PUBLICATION tap_pub FOR TABLE tab_test"); +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_pub FOR TABLE tab_test"); $node_subscriber->safe_psql('postgres', "CREATE SUBSCRIPTION tap_sub CONNECTION '$publisher_connstr' PUBLICATION tap_pub" @@ -55,7 +56,7 @@ my $result = $node_publisher->safe_psql( )); # 66 77 67 == B M C == BEGIN MESSAGE COMMIT -is($result, qq(66 +is( $result, qq(66 77 67), 'messages on slot are B M C with message option'); @@ -82,9 +83,10 @@ $result = $node_publisher->safe_psql( )); # 66 67 == B C == BEGIN COMMIT -is($result, qq(66 +is( $result, qq(66 67), - 'option messages defaults to false so message (M) is not available on slot'); + 'option messages defaults to false so message (M) is not available on slot' +); $node_subscriber->safe_psql('postgres', "ALTER SUBSCRIPTION tap_sub ENABLE"); $node_publisher->wait_for_catchup('tap_sub'); @@ -99,7 +101,8 @@ $node_publisher->poll_query_until('postgres', $node_publisher->safe_psql('postgres', "INSERT INTO tab_test VALUES (1)"); my $message_lsn = $node_publisher->safe_psql('postgres', - "SELECT pg_logical_emit_message(false, 'pgoutput', 'a non-transactional message')"); + "SELECT pg_logical_emit_message(false, 'pgoutput', 'a non-transactional message')" +); $node_publisher->safe_psql('postgres', "INSERT INTO tab_test VALUES (2)"); @@ -151,7 +154,7 @@ $result = $node_publisher->safe_psql( 'messages', 'true') )); -is($result, qq(77|0 +is( $result, qq(77|0 77|0), 'non-transactional message on slot from aborted transaction is M'); diff --git a/src/test/subscription/t/100_bugs.pl b/src/test/subscription/t/100_bugs.pl index 76a9a90bcb..21eabceb2f 100644 --- a/src/test/subscription/t/100_bugs.pl +++ b/src/test/subscription/t/100_bugs.pl @@ -137,10 +137,9 @@ $node_twoways->safe_psql( INSERT INTO t SELECT * FROM generate_series(1, $rows); INSERT INTO t2 SELECT * FROM generate_series(1, $rows); }); -$node_twoways->safe_psql( - 'd1', 'ALTER PUBLICATION testpub ADD TABLE t2'); -$node_twoways->safe_psql( - 'd2', 'ALTER SUBSCRIPTION testsub REFRESH PUBLICATION'); +$node_twoways->safe_psql('d1', 'ALTER PUBLICATION testpub ADD TABLE t2'); +$node_twoways->safe_psql('d2', + 'ALTER SUBSCRIPTION testsub REFRESH PUBLICATION'); # We cannot rely solely on wait_for_catchup() here; it isn't sufficient # when tablesync workers might still be running. So in addition to that, diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 2ff6b0784f..de22c9ba2c 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -371,8 +371,7 @@ sub GenerateTimezoneFiles print "Generating timezone files..."; - my @args = ( - "$conf/zic/zic", '-d', "$target/share/timezone"); + my @args = ("$conf/zic/zic", '-d', "$target/share/timezone"); foreach (@tzfiles) { my $tzfile = $_; diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 5a1ab33b3d..233ddbf4c2 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -40,9 +40,9 @@ my @contrib_uselibpq = ('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo', 'libpq_pipeline'); my @contrib_uselibpgport = ('libpq_pipeline', 'oid2name', 'vacuumlo'); my @contrib_uselibpgcommon = ('libpq_pipeline', 'oid2name', 'vacuumlo'); -my $contrib_extralibs = { 'libpq_pipeline' => ['ws2_32.lib'] }; -my $contrib_extraincludes = { 'dblink' => ['src/backend'] }; -my $contrib_extrasource = { +my $contrib_extralibs = { 'libpq_pipeline' => ['ws2_32.lib'] }; +my $contrib_extraincludes = { 'dblink' => ['src/backend'] }; +my $contrib_extrasource = { 'cube' => [ 'contrib/cube/cubescan.l', 'contrib/cube/cubeparse.y' ], 'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], }; @@ -58,15 +58,18 @@ my @contrib_excludes = ( # Set of variables for frontend modules my $frontend_defines = { 'initdb' => 'FRONTEND' }; -my @frontend_uselibpq = ('pg_amcheck', 'pg_ctl', 'pg_upgrade', 'pgbench', 'psql', 'initdb'); +my @frontend_uselibpq = + ('pg_amcheck', 'pg_ctl', 'pg_upgrade', 'pgbench', 'psql', 'initdb'); my @frontend_uselibpgport = ( - 'pg_amcheck', 'pg_archivecleanup', 'pg_test_fsync', - 'pg_test_timing', 'pg_upgrade', - 'pg_waldump', 'pgbench'); + 'pg_amcheck', 'pg_archivecleanup', + 'pg_test_fsync', 'pg_test_timing', + 'pg_upgrade', 'pg_waldump', + 'pgbench'); my @frontend_uselibpgcommon = ( - 'pg_amcheck', 'pg_archivecleanup', 'pg_test_fsync', - 'pg_test_timing', 'pg_upgrade', - 'pg_waldump', 'pgbench'); + 'pg_amcheck', 'pg_archivecleanup', + 'pg_test_fsync', 'pg_test_timing', + 'pg_upgrade', 'pg_waldump', + 'pgbench'); my $frontend_extralibs = { 'initdb' => ['ws2_32.lib'], 'pg_amcheck' => ['ws2_32.lib'], diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 85af28fe0b..3c5fe5dddc 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -184,7 +184,7 @@ sub GenerateFiles elsif (/\bAC_DEFINE\(OPENSSL_API_COMPAT, \[([0-9xL]+)\]/) { $ac_define_openssl_api_compat_found = 1; - $openssl_api_compat = $1; + $openssl_api_compat = $1; } } close($c); diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index a09b60fc85..1852c34109 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -109,8 +109,8 @@ sub installcheck_internal # for backwards compatibility, "serial" runs the tests in # parallel_schedule one by one. my $maxconn = $maxconn; - $maxconn = "--max-connections=1" if $schedule eq 'serial'; - $schedule = 'parallel' if $schedule eq 'serial'; + $maxconn = "--max-connections=1" if $schedule eq 'serial'; + $schedule = 'parallel' if $schedule eq 'serial'; my @args = ( "../../../$Config/pg_regress/pg_regress", @@ -141,8 +141,8 @@ sub check # for backwards compatibility, "serial" runs the tests in # parallel_schedule one by one. my $maxconn = $maxconn; - $maxconn = "--max-connections=1" if $schedule eq 'serial'; - $schedule = 'parallel' if $schedule eq 'serial'; + $maxconn = "--max-connections=1" if $schedule eq 'serial'; + $schedule = 'parallel' if $schedule eq 'serial'; InstallTemp(); chdir "${topdir}/src/test/regress"; @@ -225,9 +225,9 @@ sub tap_check # Fetch and adjust PROVE_TESTS, applying glob() to each element # defined to build a list of all the tests matching patterns. - my $prove_tests_val = $ENV{PROVE_TESTS} || "t/*.pl"; + my $prove_tests_val = $ENV{PROVE_TESTS} || "t/*.pl"; my @prove_tests_array = split(/\s+/, $prove_tests_val); - my @prove_tests = (); + my @prove_tests = (); foreach (@prove_tests_array) { push(@prove_tests, glob($_)); @@ -235,7 +235,7 @@ sub tap_check # Fetch and adjust PROVE_FLAGS, handling multiple arguments. my $prove_flags_val = $ENV{PROVE_FLAGS} || ""; - my @prove_flags = split(/\s+/, $prove_flags_val); + my @prove_flags = split(/\s+/, $prove_flags_val); my @args = ("prove", @flags, @prove_tests, @prove_flags); @@ -598,7 +598,7 @@ sub upgradecheck $ENV{PGDATA} = "$data.old"; my $outputdir = "$tmp_root/regress"; my @EXTRA_REGRESS_OPTS = ("--outputdir=$outputdir"); - mkdir "$outputdir" || die $!; + mkdir "$outputdir" || die $!; my $logdir = "$topdir/src/bin/pg_upgrade/log"; rmtree($logdir); diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index 1196febfa2..abdb08319c 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -49,7 +49,9 @@ AggStatePerHash AggStatePerPhase AggStatePerTrans AggStrategy +AggTransInfo Aggref +AggregateInstrumentation AlenState Alias AllocBlock @@ -100,10 +102,11 @@ AlterTypeStmt AlterUserMappingStmt AlteredTableInfo AlternativeSubPlan -AlternativeSubPlanState +AmcheckOptions AnalyzeAttrComputeStatsFunc AnalyzeAttrFetchFunc AnalyzeForeignTable_function +AnlExprData AnlIndexData AnyArrayType Append @@ -132,9 +135,11 @@ ArrayIterator ArrayMapState ArrayMetaState ArrayParseState +ArraySubWorkspace ArrayType AsyncQueueControl AsyncQueueEntry +AsyncRequest AttInMetadata AttStatsSlot AttoptCacheEntry @@ -172,6 +177,7 @@ BTCycleId BTDedupInterval BTDedupState BTDedupStateData +BTDeletedPageData BTIndexStat BTInsertState BTInsertStateData @@ -185,6 +191,7 @@ BTPageOpaqueData BTPageStat BTPageState BTParallelScanDesc +BTPendingFSM BTScanInsert BTScanInsertData BTScanOpaque @@ -202,7 +209,9 @@ BTVacState BTVacuumPosting BTVacuumPostingData BTWriteState +BUF_MEM BYTE +BY_HANDLE_FILE_INFORMATION Backend BackendId BackendParameters @@ -223,6 +232,7 @@ BernoulliSamplerData BgWorkerStartTime BgwHandleStatus BinaryArithmFunc +BindParamCbData BipartiteMatchState BitmapAnd BitmapAndPath @@ -247,7 +257,9 @@ BlockSamplerData BlockedProcData BlockedProcsData BloomBuildState +BloomFilter BloomMetaPageData +BloomOpaque BloomOptions BloomPageOpaque BloomPageOpaqueData @@ -311,7 +323,9 @@ COP CRITICAL_SECTION CRSSnapshotAction CState +CTECycleClause CTEMaterialize +CTESearchClause CV CachedExpression CachedPlan @@ -341,6 +355,7 @@ CkptSortItem CkptTsStatus ClientAuthentication_hook_type ClientCertMode +ClientCertName ClientData ClonePtrType ClosePortalStmt @@ -408,6 +423,7 @@ ConnParams ConnStatusType ConnType ConnectionStateEnum +ConnsAllowedState ConsiderSplitContext Const ConstrCheck @@ -424,12 +440,16 @@ ConversionLocation ConvertRowtypeExpr CookedConstraint CopyDest +CopyFormatOptions +CopyFromState +CopyFromStateData CopyInsertMethod CopyMultiInsertBuffer CopyMultiInsertInfo -CopyState -CopyStateData +CopySource CopyStmt +CopyToState +CopyToStateData Cost CostSelector Counters @@ -500,6 +520,7 @@ DSA DWORD DataDumperPtr DataPageDeleteStack +DatabaseInfo DateADT Datum DatumTupleFields @@ -533,6 +554,7 @@ DirectoryMethodFile DisableTimeoutParams DiscardMode DiscardStmt +DistanceValue DistinctExpr DoStmt DocRepresentation @@ -596,6 +618,7 @@ EquivalenceMember ErrorContextCallback ErrorData EstimateDSMForeignScan_function +EstimationInfo EventTriggerCacheEntry EventTriggerCacheItem EventTriggerCacheStateType @@ -607,9 +630,12 @@ ExceptionLabelMap ExceptionMap ExclusiveBackupState ExecAuxRowMark +ExecEvalBoolSubroutine ExecEvalSubroutine +ExecForeignBatchInsert_function ExecForeignDelete_function ExecForeignInsert_function +ExecForeignTruncate_function ExecForeignUpdate_function ExecParallelEstimateContext ExecParallelInitializeDSMContext @@ -629,6 +655,7 @@ ExecutorStart_hook_type ExpandedArrayHeader ExpandedObjectHeader ExpandedObjectMethods +ExpandedRange ExpandedRecordFieldInfo ExpandedRecordHeader ExplainDirectModify_function @@ -647,6 +674,7 @@ ExprContext_CB ExprDoneCond ExprEvalOp ExprEvalOpLookup +ExprEvalRowtypeCache ExprEvalStep ExprState ExprStateEvalFunc @@ -661,6 +689,8 @@ FDWCollateState FD_SET FILE FILETIME +FILE_INFORMATION_CLASS +FILE_STANDARD_INFORMATION FSMAddress FSMPage FSMPageData @@ -679,6 +709,7 @@ FileFdwPlanState FileNameMap FileTag FinalPathExtraData +FindColsContext FindSplitData FindSplitStrat FixedParallelExecutorState @@ -695,6 +726,9 @@ ForEachState ForFiveState ForFourState ForThreeState +ForeignAsyncConfigureWait_function +ForeignAsyncNotify_function +ForeignAsyncRequest_function ForeignDataWrapper ForeignKeyCacheInfo ForeignKeyOptInfo @@ -838,7 +872,6 @@ FuncDetailCode FuncExpr FuncInfo FuncLookupError -Function FunctionCallInfo FunctionCallInfoBaseData FunctionParameter @@ -890,6 +923,7 @@ GenericCosts GenericXLogState GeqoPrivateData GetForeignJoinPaths_function +GetForeignModifyBatchSize_function GetForeignPaths_function GetForeignPlan_function GetForeignRelSize_function @@ -924,12 +958,13 @@ GinStatsData GinTernaryValue GinTupleCollector GinVacuumState -GistBufferingMode +GistBuildMode GistEntryVector GistHstoreOptions GistInetKey GistNSN GistOptBufferingMode +GistSortedBuildPageState GistSplitUnion GistSplitVector GistTsVectorOptions @@ -940,6 +975,7 @@ GrantRoleStmt GrantStmt GrantTargetType Group +GroupClause GroupPath GroupPathExtraData GroupResultPath @@ -980,6 +1016,7 @@ HEntry HIST_ENTRY HKEY HLOCAL +HMAC_CTX HMODULE HOldEntry HRESULT @@ -1041,6 +1078,7 @@ INFIX INT128 INTERFACE_INFO IOFuncSelector +IO_STATUS_BLOCK IPCompareMethod ITEM IV @@ -1073,6 +1111,8 @@ IndexBulkDeleteCallback IndexBulkDeleteResult IndexClause IndexClauseSet +IndexDeleteCounts +IndexDeletePrefetchState IndexElem IndexFetchHeapData IndexFetchTableData @@ -1099,7 +1139,6 @@ InferenceElem InfoItem InhInfo InheritableSocket -InheritanceKind InitSampleScan_function InitializeDSMForeignScan_function InitializeWorkerForeignScan_function @@ -1121,6 +1160,7 @@ IpcMemoryKey IpcMemoryState IpcSemaphoreId IpcSemaphoreKey +IsForeignPathAsyncCapable_function IsForeignRelUpdatable_function IsForeignScanParallelSafe_function IspellDict @@ -1204,6 +1244,7 @@ JsonbParseState JsonbSubWorkspace JsonbTypeCategory JsonbValue +JumbleState JunkFilter KeyArray KeySuffix @@ -1223,7 +1264,6 @@ LLVMJitHandle LLVMMemoryBufferRef LLVMModuleRef LLVMOrcJITStackRef -LLVMOrcLookupStateRef LLVMOrcModuleHandle LLVMOrcTargetAddress LLVMPassManagerBuilderRef @@ -1252,20 +1292,21 @@ LPDWORD LPSECURITY_ATTRIBUTES LPSERVICE_STATUS LPSTR +LPTHREAD_START_ROUTINE LPTSTR LPVOID LPWSTR LSEG LUID LVDeadTuples +LVPagePruneState LVParallelState -LVRelStats +LVRelState LVSavedErrInfo LVShared LVSharedIndStats LWLock LWLockHandle -LWLockMinimallyPadded LWLockMode LWLockPadded LabelProvider @@ -1298,6 +1339,7 @@ LocalBufferLookupEnt LocalPgBackendStatus LocalTransactionId LocationIndex +LocationLen LockAcquireResult LockClauseStrength LockData @@ -1318,24 +1360,25 @@ LockingClause LogOpts LogStmtLevel LogicalDecodeBeginCB +LogicalDecodeBeginPrepareCB LogicalDecodeChangeCB LogicalDecodeCommitCB -LogicalDecodeFilterPrepareCB -LogicalDecodeBeginPrepareCB -LogicalDecodePrepareCB LogicalDecodeCommitPreparedCB -LogicalDecodeRollbackPreparedCB LogicalDecodeFilterByOriginCB +LogicalDecodeFilterPrepareCB LogicalDecodeMessageCB +LogicalDecodePrepareCB +LogicalDecodeRollbackPreparedCB LogicalDecodeShutdownCB +LogicalDecodeStartupCB +LogicalDecodeStreamAbortCB +LogicalDecodeStreamChangeCB +LogicalDecodeStreamCommitCB +LogicalDecodeStreamMessageCB +LogicalDecodeStreamPrepareCB LogicalDecodeStreamStartCB LogicalDecodeStreamStopCB -LogicalDecodeStreamAbortCB -LogicalDecodeStreamPrepareCB -LogicalDecodeStreamCommitCB -LogicalDecodeStreamChangeCB -LogicalDecodeStreamMessageCB -LogicalDecodeStartupCB +LogicalDecodeStreamTruncateCB LogicalDecodeTruncateCB LogicalDecodingContext LogicalErrorCallbackState @@ -1346,6 +1389,7 @@ LogicalOutputPluginWriterWrite LogicalRepBeginData LogicalRepCommitData LogicalRepCtxStruct +LogicalRepMsgType LogicalRepPartMapEntry LogicalRepRelId LogicalRepRelMapEntry @@ -1353,7 +1397,6 @@ LogicalRepRelation LogicalRepTupleData LogicalRepTyp LogicalRepWorker -LogicalRepWorkerId LogicalRewriteMappingData LogicalTape LogicalTapeSet @@ -1367,6 +1410,7 @@ MEMORY_BASIC_INFORMATION MINIDUMPWRITEDUMP MINIDUMP_TYPE MJEvalResult +MTTargetRelLookup MVDependencies MVDependency MVNDistinct @@ -1394,10 +1438,12 @@ MetaCommand MinMaxAggInfo MinMaxAggPath MinMaxExpr +MinMaxMultiOptions MinMaxOp MinimalTuple MinimalTupleData MinimalTupleTableSlot +MinmaxMultiOpaque MinmaxOpaque ModifyTable ModifyTablePath @@ -1417,6 +1463,7 @@ MultirangeParseState MultirangeType NDBOX NODE +NTSTATUS NUMCacheEntry NUMDesc NUMProc @@ -1486,6 +1533,7 @@ Oid OidOptions OkeysState OldSnapshotControlData +OldSnapshotTimeMapping OldToNewMapping OldToNewMappingData OnCommitAction @@ -1521,6 +1569,7 @@ PATH PBOOL PCtxtHandle PFN +PFN_NTQUERYINFORMATIONFILE PGAlignedBlock PGAlignedXLogBlock PGAsyncStatusType @@ -1556,8 +1605,9 @@ PGQueryClass PGRUsage PGSemaphore PGSemaphoreData -PGSetenvStatusType PGShmemHeader +PGTargetServerType +PGTernaryBool PGTransactionStatusType PGVerbosity PG_Locale_Strategy @@ -1575,12 +1625,12 @@ PGresAttValue PGresParamDesc PGresult PGresult_data -PgArchData PHANDLE +PIO_STATUS_BLOCK PLAINTREE +PLAssignStmt PLUID_AND_ATTRIBUTES PLcword -PLpgSQL_arrayelem PLpgSQL_case_when PLpgSQL_condition PLpgSQL_datum @@ -1725,6 +1775,8 @@ Pairs ParallelAppendState ParallelBitmapHeapState ParallelBlockTableScanDesc +ParallelBlockTableScanWorker +ParallelBlockTableScanWorkerData ParallelCompletionPtr ParallelContext ParallelExecutorInfo @@ -1736,6 +1788,7 @@ ParallelIndexScanDesc ParallelReadyList ParallelSlot ParallelSlotArray +ParallelSlotResultHandler ParallelState ParallelTableScanDesc ParallelTableScanDescData @@ -1792,7 +1845,6 @@ PartitionPruningData PartitionRangeBound PartitionRangeDatum PartitionRangeDatumKind -PartitionRoutingInfo PartitionScheme PartitionSpec PartitionTupleRouting @@ -1807,6 +1859,8 @@ PathHashStack PathKey PathKeysComparison PathTarget +PatternInfo +PatternInfoArray Pattern_Prefix_Status Pattern_Type PendingFsyncEntry @@ -1818,6 +1872,7 @@ PerlInterpreter Perl_check_t Perl_ppaddr_t Permutation +PgArchData PgBackendGSSStatus PgBackendSSLStatus PgBackendStatus @@ -1830,6 +1885,7 @@ PgBenchValue PgBenchValueType PgChecksumMode PgFdwAnalyzeState +PgFdwConnState PgFdwDirectModifyState PgFdwModifyState PgFdwOption @@ -1846,10 +1902,12 @@ PgStat_FunctionEntry PgStat_GlobalStats PgStat_Msg PgStat_MsgAnalyze +PgStat_MsgAnlAncestors PgStat_MsgArchiver PgStat_MsgAutovacStart PgStat_MsgBgWriter PgStat_MsgChecksumFailure +PgStat_MsgConn PgStat_MsgDeadlock PgStat_MsgDropdb PgStat_MsgDummy @@ -1930,7 +1988,6 @@ PredicateLockTargetType PrefetchBufferResult PrepParallelRestorePtrType PrepareStmt -PreparedParamsData PreparedStatement PresortedKeyData PrewarmType @@ -1949,6 +2006,7 @@ ProcSignalHeader ProcSignalReason ProcSignalSlot ProcState +ProcWaitStatus ProcessUtilityContext ProcessUtility_hook_type ProcessingMode @@ -2009,6 +2067,7 @@ QueryRepresentationOperand QuerySource QueueBackendStatus QueuePosition +QuitSignalReason RBTNode RBTOrderControl RBTree @@ -2040,7 +2099,9 @@ RangeTblRef RangeType RangeVar RangeVarGetRelidCallback +Ranges RawColumnDefault +RawParseMode RawStmt ReInitializeDSMForeignScan_function ReScanForeignScan_function @@ -2055,6 +2116,7 @@ RecordCacheEntry RecordCompareData RecordIOData RecoveryLockListsEntry +RecoveryPauseState RecoveryState RecoveryTargetTimeLineGoal RecoveryTargetType @@ -2089,6 +2151,7 @@ RelToCluster RelabelType Relation RelationData +RelationInfo RelationPtr RelationSyncEntry RelcacheCallbackFunction @@ -2107,10 +2170,21 @@ ReorderBufferApplyTruncateCB ReorderBufferBeginCB ReorderBufferChange ReorderBufferCommitCB +ReorderBufferCommitPreparedCB ReorderBufferDiskChange ReorderBufferIterTXNEntry ReorderBufferIterTXNState ReorderBufferMessageCB +ReorderBufferPrepareCB +ReorderBufferRollbackPreparedCB +ReorderBufferStreamAbortCB +ReorderBufferStreamChangeCB +ReorderBufferStreamCommitCB +ReorderBufferStreamMessageCB +ReorderBufferStreamPrepareCB +ReorderBufferStreamStartCB +ReorderBufferStreamStopCB +ReorderBufferStreamTruncateCB ReorderBufferTXN ReorderBufferTXNByIdEnt ReorderBufferToastEnt @@ -2144,9 +2218,17 @@ RestoreOptions RestorePass RestrictInfo Result +ResultCache +ResultCacheEntry +ResultCacheInstrumentation +ResultCacheKey +ResultCachePath +ResultCacheState +ResultCacheTuple ResultRelInfo ResultState ReturnSetInfo +ReturnStmt RevmapContents RewriteMappingDataEntry RewriteMappingFile @@ -2163,6 +2245,7 @@ RollupData RowCompareExpr RowCompareType RowExpr +RowIdentityVarInfo RowMarkClause RowMarkType RowSecurityDesc @@ -2182,9 +2265,6 @@ SERIALIZABLEXIDTAG SERVICE_STATUS SERVICE_STATUS_HANDLE SERVICE_TABLE_ENTRY -SHA1_CTX -SHA256_CTX -SHA512_CTX SHM_QUEUE SID_AND_ATTRIBUTES SID_IDENTIFIER_AUTHORITY @@ -2197,7 +2277,11 @@ SMgrSortArray SOCKADDR SOCKET SPELL +SPICallbackArg +SPIExecuteOptions +SPIParseOpenOptions SPIPlanPtr +SPIPrepareOptions SPITupleTable SPLITCOST SPNode @@ -2207,6 +2291,7 @@ SQLCmd SQLDropObject SQLFunctionCache SQLFunctionCachePtr +SQLFunctionParseInfo SQLFunctionParseInfoPtr SQLValueFunction SQLValueFunctionOp @@ -2215,14 +2300,15 @@ SSLExtensionInfoContext SSL_CTX STARTUPINFO STRLEN -ST_ELEMENT_TYPE -ST_POINTER_TYPE SV +SYNCHRONIZATION_BARRIER SampleScan SampleScanGetSampleSize_function SampleScanState SamplerRandomState ScalarArrayOpExpr +ScalarArrayOpExprHashEntry +ScalarArrayOpExprHashTable ScalarIOData ScalarItem ScalarMCVItem @@ -2254,11 +2340,13 @@ SerCommitSeqNo SerialControl SerializableXactHandle SerializedActiveRelMaps +SerializedRanges SerializedReindexState SerializedSnapshotData SerializedTransactionState Session SessionBackupState +SessionEndType SetConstraintState SetConstraintStateData SetConstraintTriggerData @@ -2272,9 +2360,11 @@ SetOpStatePerGroup SetOpStrategy SetOperation SetOperationStmt +SetQuantifier SetToDefault SetupWorkerPtrType ShDependObjectInfo +SharedAggInfo SharedBitmapState SharedDependencyObjectType SharedDependencyType @@ -2293,6 +2383,7 @@ SharedJitInstrumentation SharedRecordTableEntry SharedRecordTableKey SharedRecordTypmodRegistry +SharedResultCacheInfo SharedSortInfo SharedTuplestore SharedTuplestoreAccessor @@ -2385,6 +2476,7 @@ SpinDelayStatus SplitInterval SplitLR SplitPoint +SplitTextOutputData SplitVar SplitedPageLayout StackElem @@ -2392,7 +2484,6 @@ StartBlobPtrType StartBlobsPtrType StartDataPtrType StartReplicationCmd -StartupPacket StartupStatusEnum StatEntry StatExtEntry @@ -2400,7 +2491,9 @@ StatMsgType StateFileChunk StatisticExtInfo Stats +StatsBuildData StatsData +StatsElem StatsExtInfo StdAnalyzeData StdRdOptions @@ -2422,10 +2515,13 @@ SubXactCallback SubXactCallbackItem SubXactEvent SubXactInfo -SubplanResultRelHashElem SubqueryScan SubqueryScanPath SubqueryScanState +SubscriptExecSetup +SubscriptExecSteps +SubscriptRoutines +SubscriptTransform SubscriptingRef SubscriptingRefState Subscription @@ -2442,6 +2538,7 @@ SyncRepConfigData SyncRepStandbyData SyncRequestHandler SyncRequestType +SysFKRelationship SysScanDesc SyscacheCallbackFunction SystemRowsSamplerData @@ -2457,6 +2554,9 @@ TBMStatus TBlockState TIDBitmap TM_FailureData +TM_IndexDelete +TM_IndexDeleteOp +TM_IndexStatus TM_Result TOKEN_DEFAULT_DACL TOKEN_INFORMATION_CLASS @@ -2502,6 +2602,7 @@ T_WorkerStatus TabStatHashEntry TabStatusArray TableAmRoutine +TableAttachInfo TableDataInfo TableFunc TableFuncRoutine @@ -2539,8 +2640,13 @@ TextPositionState TheLexeme TheSubstitute TidExpr +TidExprType TidHashKey +TidOpExpr TidPath +TidRangePath +TidRangeScan +TidRangeScanState TidScan TidScanState TimeADT @@ -2558,6 +2664,7 @@ TimestampTz TmFromChar TmToChar ToastAttrInfo +ToastCompressionId ToastTupleContext ToastedAttribute TocEntry @@ -2702,6 +2809,7 @@ ViewOptions ViewStmt VirtualTransactionId VirtualTupleTableSlot +VolatileFunctionStatus Vsrt WAIT_ORDER WALAvailability @@ -2716,7 +2824,6 @@ WCHAR WCOKind WFW_WaitOption WIDGET -WIN32_FILE_ATTRIBUTE_DATA WORD WORKSTATE WSABUF @@ -2825,8 +2932,8 @@ XactCallbackItem XactEvent XactLockTableWaitInfo XidBoundsViolation +XidCacheStatus XidCommitStatus -XidHorizonPrefetchState XidStatus XmlExpr XmlExprOp @@ -2844,12 +2951,16 @@ __CreateRestrictedToken __IsProcessInJob __QueryInformationJobObject __SetInformationJobObject +__time64_t +_dev_t +_ino_t _resultmap _stringlist -abs acquireLocksOnSubLinks_context adjust_appendrel_attrs_context +aff_regex_struct allocfunc +amadjustmembers_function ambeginscan_function ambuild_function ambuildempty_function @@ -2894,6 +3005,7 @@ bits32 bits8 bloom_filter brin_column_state +brin_serialize_callback_type bytea cached_re_str cashKEY @@ -2913,6 +3025,7 @@ coercion collation_cache_entry color colormaprange +compare_context config_var_value contain_aggs_of_level_context convert_testexpr_context @@ -2922,6 +3035,7 @@ core_yy_extra_type core_yyscan_t corrupt_items cost_qual_eval_context +cp_hash_func create_upper_paths_hook_type createdb_failure_params crosstab_HashEnt @@ -2990,6 +3104,7 @@ file_action_t file_entry_t file_type_t filehash_hash +filehash_iterator filemap_t fill_string_relopt finalize_primnode_context @@ -3023,7 +3138,6 @@ generate_series_numeric_fctx generate_series_timestamp_fctx generate_series_timestamptz_fctx generate_subscripts_fctx -get_agg_clause_costs_context get_attavgwidth_hook_type get_index_stats_hook_type get_relation_info_hook_type @@ -3097,8 +3211,8 @@ intset_internal_node intset_leaf_node intset_node intvKEY -itemIdSort -itemIdSortData +itemIdCompact +itemIdCompactData iterator jmp_buf join_search_hook_type @@ -3147,11 +3261,11 @@ manifest_wal_range map_variable_attnos_context max_parallel_hazard_context mb2wchar_with_len_converter +mbchar_verifier mbcharacter_incrementer mbdisplaylen_converter mblen_converter -mbverifier -md5_ctxt +mbstr_verifier metastring mix_data_t mixedStruct @@ -3214,6 +3328,7 @@ pg_enc pg_enc2gettext pg_enc2name pg_encname +pg_funcptr_t pg_gssinfo pg_hmac_ctx pg_int64 @@ -3236,9 +3351,11 @@ pg_time_usec_t pg_tz pg_tz_cache pg_tzenum +pg_unicode_decompinfo pg_unicode_decomposition pg_unicode_norminfo pg_unicode_normprops +pg_unicode_recompinfo pg_utf_to_local_combined pg_uuid_t pg_wc_probefunc @@ -3251,8 +3368,6 @@ pgsql_thing_t pgssEntry pgssGlobalStats pgssHashKey -pgssJumbleState -pgssLocationLen pgssSharedState pgssStoreKind pgssVersion @@ -3283,6 +3398,7 @@ pointer polymorphic_actuals pos_trgm post_parse_analyze_hook_type +postprocess_result_function pqbool pqsigfunc printQueryOpt @@ -3301,8 +3417,8 @@ proclist_head proclist_mutable_iter proclist_node promptStatus_t -pthread_attr_t pthread_barrier_t +pthread_cond_t pthread_key_t pthread_mutex_t pthread_once_t @@ -3314,6 +3430,7 @@ pull_varnos_context pull_vars_context pullup_replace_vars_context pushdown_safety_info +qc_hash_func qsort_arg_comparator qsort_comparator query_pathkeys_callback @@ -3353,6 +3470,8 @@ remoteDep rendezvousHashEntry replace_rte_variables_callback replace_rte_variables_context +resultcache_hash +resultcache_iterator ret_type rewind_source rewrite_event @@ -3361,6 +3480,7 @@ rm_detail_t role_auth_extra row_security_policy_hook_type rsv_callback +saophash_hash save_buffer scram_state scram_state_enum @@ -3432,12 +3552,13 @@ substitute_phv_relids_context svtype symbol tablespaceinfo -teReqs teSection temp_tablespaces_extra -test_function +test_re_flags +test_regex_ctx test_shm_mq_header test_spec +test_start_function text timeKEY time_t @@ -3515,7 +3636,6 @@ walrcv_startstreaming_fn wchar2mb_with_len_converter wchar_t win32_deadchild_waitinfo -win32_pthread wint_t worker_state worktable @@ -3538,7 +3658,6 @@ xl_btree_unlink_page xl_btree_update xl_btree_vacuum xl_clog_truncate -xl_commit_ts_set xl_commit_ts_truncate xl_dbase_create_rec xl_dbase_drop_rec