Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ check check-tests installcheck installcheck-parallel installcheck-tests: CHECKPR
check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
$(MAKE) -C src/test/regress $@

$(call recurse,check-world,src/test src/pl src/interfaces contrib src/bin,check)
$(call recurse,check-world,src/test src/pl src/interfaces contrib src/bin src/tools/pg_bsd_indent,check)
$(call recurse,checkprep, src/test src/pl src/interfaces contrib src/bin)

$(call recurse,installcheck-world,src/test src/pl src/interfaces contrib src/bin,installcheck)
Expand Down
4 changes: 2 additions & 2 deletions contrib/amcheck/verify_heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,8 @@ FullTransactionIdFromXidAndCtx(TransactionId xid, const HeapCheckContext *ctx)
diff = (int32) (ctx->next_xid - xid);

/*
* In cases of corruption we might see a 32bit xid that is before epoch
* 0. We can't represent that as a 64bit xid, due to 64bit xids being
* In cases of corruption we might see a 32bit xid that is before epoch 0.
* We can't represent that as a 64bit xid, due to 64bit xids being
* unsigned integers, without the modulo arithmetic of 32bit xid. There's
* no really nice way to deal with that, but it works ok enough to use
* FirstNormalFullTransactionId in that case, as a freshly initdb'd
Expand Down
2 changes: 1 addition & 1 deletion contrib/dblink/dblink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,7 @@ dblink_get_connections(PG_FUNCTION_ARGS)

if (astate)
PG_RETURN_DATUM(makeArrayResult(astate,
CurrentMemoryContext));
CurrentMemoryContext));
else
PG_RETURN_NULL();
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/ltree/ltree_gist.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ltree_gist_alloc(bool isalltrue, BITVECP sign, int siglen,
ltree *left, ltree *right)
{
int32 size = LTG_HDRSIZE + (isalltrue ? 0 : siglen) +
(left ? VARSIZE(left) + (right ? VARSIZE(right) : 0) : 0);
(left ? VARSIZE(left) + (right ? VARSIZE(right) : 0) : 0);
ltree_gist *result = palloc(size);

SET_VARSIZE(result, size);
Expand Down
4 changes: 2 additions & 2 deletions contrib/postgres_fdw/postgres_fdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2032,8 +2032,8 @@ postgresGetForeignModifyBatchSize(ResultRelInfo *resultRelInfo)
{
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);
Expand Down
4 changes: 2 additions & 2 deletions contrib/test_decoding/test_decoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ pg_decode_begin_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn)
{
TestDecodingData *data = ctx->output_plugin_private;
TestDecodingTxnData *txndata =
MemoryContextAllocZero(ctx->context, sizeof(TestDecodingTxnData));
MemoryContextAllocZero(ctx->context, sizeof(TestDecodingTxnData));

txndata->xact_wrote_changes = false;
txn->output_plugin_private = txndata;
Expand Down Expand Up @@ -354,7 +354,7 @@ pg_decode_begin_prepare_txn(LogicalDecodingContext *ctx, ReorderBufferTXN *txn)
{
TestDecodingData *data = ctx->output_plugin_private;
TestDecodingTxnData *txndata =
MemoryContextAllocZero(ctx->context, sizeof(TestDecodingTxnData));
MemoryContextAllocZero(ctx->context, sizeof(TestDecodingTxnData));

txndata->xact_wrote_changes = false;
txn->output_plugin_private = txndata;
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ clean:
$(MAKE) -C test $@
$(MAKE) -C tutorial NO_PGXS=1 $@
$(MAKE) -C test/isolation $@
$(MAKE) -C tools/pg_bsd_indent $@

distclean maintainer-clean:
$(MAKE) -C test $@
$(MAKE) -C tutorial NO_PGXS=1 $@
$(MAKE) -C test/isolation $@
$(MAKE) -C tools/pg_bsd_indent $@
rm -f Makefile.port Makefile.global


Expand Down
24 changes: 12 additions & 12 deletions src/backend/access/brin/brin.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,8 @@ bringetbitmap(IndexScanDesc scan, TIDBitmap *tbm)
}

/*
* If we found a scan key eliminating the range, no need to
* check additional ones.
* If we found a scan key eliminating the range, no need
* to check additional ones.
*/
if (!addrange)
break;
Expand Down Expand Up @@ -1816,8 +1816,8 @@ add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup,
bval = &dtup->bt_columns[keyno];

/*
* Does the range have actual NULL values? Either of the flags can
* be set, but we ignore the state before adding first row.
* Does the range have actual NULL values? Either of the flags can be
* set, but we ignore the state before adding first row.
*
* We have to remember this, because we'll modify the flags and we
* need to know if the range started as empty.
Expand Down Expand Up @@ -1857,12 +1857,12 @@ add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup,

/*
* If the range was had actual NULL values (i.e. did not start empty),
* make sure we don't forget about the NULL values. Either the allnulls
* flag is still set to true, or (if the opclass cleared it) we need to
* set hasnulls=true.
* make sure we don't forget about the NULL values. Either the
* allnulls flag is still set to true, or (if the opclass cleared it)
* we need to set hasnulls=true.
*
* XXX This can only happen when the opclass modified the tuple, so the
* modified flag should be set.
* XXX This can only happen when the opclass modified the tuple, so
* the modified flag should be set.
*/
if (has_nulls && !(bval->bv_hasnulls || bval->bv_allnulls))
{
Expand All @@ -1874,9 +1874,9 @@ add_values_to_range(Relation idxRel, BrinDesc *bdesc, BrinMemTuple *dtup,
/*
* After updating summaries for all the keys, mark it as not empty.
*
* If we're actually changing the flag value (i.e. tuple started as empty),
* we should have modified the tuple. So we should not see empty range that
* was not modified.
* If we're actually changing the flag value (i.e. tuple started as
* empty), we should have modified the tuple. So we should not see empty
* range that was not modified.
*/
Assert(!dtup->bt_empty_range || modified);
dtup->bt_empty_range = false;
Expand Down
6 changes: 3 additions & 3 deletions src/backend/access/common/reloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ allocateReloptStruct(Size base, relopt_value *options, int numoptions)
if (optstr->fill_cb)
{
const char *val = optval->isset ? optval->values.string_val :
optstr->default_isnull ? NULL : optstr->default_val;
optstr->default_isnull ? NULL : optstr->default_val;

size += optstr->fill_cb(val, NULL);
}
Expand Down Expand Up @@ -1799,8 +1799,8 @@ fillRelOptions(void *rdopts, Size basesize,
if (optstring->fill_cb)
{
Size size =
optstring->fill_cb(string_val,
(char *) rdopts + offset);
optstring->fill_cb(string_val,
(char *) rdopts + offset);

if (size)
{
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/gist/gist.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ gistformdownlink(Relation rel, Buffer buf, GISTSTATE *giststate,
for (offset = FirstOffsetNumber; offset <= maxoff; offset = OffsetNumberNext(offset))
{
IndexTuple ituple = (IndexTuple)
PageGetItem(page, PageGetItemId(page, offset));
PageGetItem(page, PageGetItemId(page, offset));

if (downlink == NULL)
downlink = CopyIndexTuple(ituple);
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/gist/gistget.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ gistgettuple(IndexScanDesc scan, ScanDirection dir)
if (so->killedItems == NULL)
{
MemoryContext oldCxt =
MemoryContextSwitchTo(so->giststate->scanCxt);
MemoryContextSwitchTo(so->giststate->scanCxt);

so->killedItems =
(OffsetNumber *) palloc(MaxIndexTuplesPerPage
Expand Down Expand Up @@ -694,7 +694,7 @@ gistgettuple(IndexScanDesc scan, ScanDirection dir)
if (so->killedItems == NULL)
{
MemoryContext oldCxt =
MemoryContextSwitchTo(so->giststate->scanCxt);
MemoryContextSwitchTo(so->giststate->scanCxt);

so->killedItems =
(OffsetNumber *) palloc(MaxIndexTuplesPerPage
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/gist/gistxlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ gistRedoPageUpdateRecord(XLogReaderState *record)
if (data - begin < datalen)
{
OffsetNumber off = (PageIsEmpty(page)) ? FirstOffsetNumber :
OffsetNumberNext(PageGetMaxOffsetNumber(page));
OffsetNumberNext(PageGetMaxOffsetNumber(page));

while (data - begin < datalen)
{
Expand Down
19 changes: 10 additions & 9 deletions src/backend/access/heap/heapam.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ heapgettup(HeapScanDesc scan,
if (scan->rs_base.rs_parallel != NULL)
{
ParallelBlockTableScanDesc pbscan =
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
ParallelBlockTableScanWorker pbscanwork =
scan->rs_parallelworkerdata;
scan->rs_parallelworkerdata;

table_block_parallelscan_startblock_init(scan->rs_base.rs_rd,
pbscanwork, pbscan);
Expand Down Expand Up @@ -773,9 +773,9 @@ heapgettup(HeapScanDesc scan,
else if (scan->rs_base.rs_parallel != NULL)
{
ParallelBlockTableScanDesc pbscan =
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
ParallelBlockTableScanWorker pbscanwork =
scan->rs_parallelworkerdata;
scan->rs_parallelworkerdata;

page = table_block_parallelscan_nextpage(scan->rs_base.rs_rd,
pbscanwork, pbscan);
Expand Down Expand Up @@ -889,9 +889,9 @@ heapgettup_pagemode(HeapScanDesc scan,
if (scan->rs_base.rs_parallel != NULL)
{
ParallelBlockTableScanDesc pbscan =
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
ParallelBlockTableScanWorker pbscanwork =
scan->rs_parallelworkerdata;
scan->rs_parallelworkerdata;

table_block_parallelscan_startblock_init(scan->rs_base.rs_rd,
pbscanwork, pbscan);
Expand Down Expand Up @@ -1082,9 +1082,9 @@ heapgettup_pagemode(HeapScanDesc scan,
else if (scan->rs_base.rs_parallel != NULL)
{
ParallelBlockTableScanDesc pbscan =
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
(ParallelBlockTableScanDesc) scan->rs_base.rs_parallel;
ParallelBlockTableScanWorker pbscanwork =
scan->rs_parallelworkerdata;
scan->rs_parallelworkerdata;

page = table_block_parallelscan_nextpage(scan->rs_base.rs_rd,
pbscanwork, pbscan);
Expand Down Expand Up @@ -2654,7 +2654,7 @@ static inline bool
xmax_infomask_changed(uint16 new_infomask, uint16 old_infomask)
{
const uint16 interesting =
HEAP_XMAX_IS_MULTI | HEAP_XMAX_LOCK_ONLY | HEAP_LOCK_MASK;
HEAP_XMAX_IS_MULTI | HEAP_XMAX_LOCK_ONLY | HEAP_LOCK_MASK;

if ((new_infomask & interesting) != (old_infomask & interesting))
return true;
Expand Down Expand Up @@ -2731,6 +2731,7 @@ heap_delete(Relation relation, ItemPointer tid,
tp.t_self = *tid;

l1:

/*
* If we didn't pin the visibility map page and the page has become all
* visible while we were busy locking the buffer, we'll have to unlock and
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/heap/pruneheap.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ heap_prune_satisfies_vacuum(PruneState *prstate, HeapTuple tup, Buffer buffer)
if (!TransactionIdIsValid(prstate->old_snap_xmin))
{
TransactionId horizon =
GlobalVisTestNonRemovableHorizon(prstate->vistest);
GlobalVisTestNonRemovableHorizon(prstate->vistest);

TransactionIdLimitedForOldSnapshots(horizon, prstate->rel,
&prstate->old_snap_xmin,
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/heap/vacuumlazy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3104,8 +3104,8 @@ dead_items_max_items(LVRelState *vacrel)
{
int64 max_items;
int vac_work_mem = IsAutoVacuumWorkerProcess() &&
autovacuum_work_mem != -1 ?
autovacuum_work_mem : maintenance_work_mem;
autovacuum_work_mem != -1 ?
autovacuum_work_mem : maintenance_work_mem;

if (vacrel->nindexes > 0)
{
Expand Down
2 changes: 1 addition & 1 deletion src/backend/access/nbtree/nbtpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -3069,7 +3069,7 @@ _bt_pendingfsm_add(BTVacState *vstate,
if (vstate->npendingpages > 0)
{
FullTransactionId lastsafexid =
vstate->pendingpages[vstate->npendingpages - 1].safexid;
vstate->pendingpages[vstate->npendingpages - 1].safexid;

Assert(FullTransactionIdFollowsOrEquals(safexid, lastsafexid));
}
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/rmgrdesc/dbasedesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dbase_desc(StringInfo buf, XLogReaderState *record)
if (info == XLOG_DBASE_CREATE_FILE_COPY)
{
xl_dbase_create_file_copy_rec *xlrec =
(xl_dbase_create_file_copy_rec *) rec;
(xl_dbase_create_file_copy_rec *) rec;

appendStringInfo(buf, "copy dir %u/%u to %u/%u",
xlrec->src_tablespace_id, xlrec->src_db_id,
Expand All @@ -36,7 +36,7 @@ dbase_desc(StringInfo buf, XLogReaderState *record)
else if (info == XLOG_DBASE_CREATE_WAL_LOG)
{
xl_dbase_create_wal_log_rec *xlrec =
(xl_dbase_create_wal_log_rec *) rec;
(xl_dbase_create_wal_log_rec *) rec;

appendStringInfo(buf, "create dir %u/%u",
xlrec->tablespace_id, xlrec->db_id);
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/rmgrdesc/gindesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
else
{
ginxlogInsertDataInternal *insertData =
(ginxlogInsertDataInternal *) payload;
(ginxlogInsertDataInternal *) payload;

appendStringInfo(buf, " pitem: %u-%u/%u",
PostingItemGetBlockNumber(&insertData->newitem),
Expand Down Expand Up @@ -156,7 +156,7 @@ gin_desc(StringInfo buf, XLogReaderState *record)
else
{
ginxlogVacuumDataLeafPage *xlrec =
(ginxlogVacuumDataLeafPage *) XLogRecGetBlockData(record, 0, NULL);
(ginxlogVacuumDataLeafPage *) XLogRecGetBlockData(record, 0, NULL);

desc_recompress_leaf(buf, &xlrec->data);
}
Expand Down
10 changes: 5 additions & 5 deletions src/backend/access/spgist/spgscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ spgAllocSearchItem(SpGistScanOpaque so, bool isnull, double *distances)
{
/* allocate distance array only for non-NULL items */
SpGistSearchItem *item =
palloc(SizeOfSpGistSearchItem(isnull ? 0 : so->numberOfNonNullOrderBys));
palloc(SizeOfSpGistSearchItem(isnull ? 0 : so->numberOfNonNullOrderBys));

item->isNull = isnull;

Expand All @@ -130,7 +130,7 @@ static void
spgAddStartItem(SpGistScanOpaque so, bool isnull)
{
SpGistSearchItem *startEntry =
spgAllocSearchItem(so, isnull, so->zeroDistances);
spgAllocSearchItem(so, isnull, so->zeroDistances);

ItemPointerSet(&startEntry->heapPtr,
isnull ? SPGIST_NULL_BLKNO : SPGIST_ROOT_BLKNO,
Expand Down Expand Up @@ -768,7 +768,7 @@ spgTestLeafTuple(SpGistScanOpaque so,
storeRes_func storeRes)
{
SpGistLeafTuple leafTuple = (SpGistLeafTuple)
PageGetItem(page, PageGetItemId(page, offset));
PageGetItem(page, PageGetItemId(page, offset));

if (leafTuple->tupstate != SPGIST_LIVE)
{
Expand Down Expand Up @@ -896,7 +896,7 @@ spgWalk(Relation index, SpGistScanOpaque so, bool scanWholeIndex,
else /* page is inner */
{
SpGistInnerTuple innerTuple = (SpGistInnerTuple)
PageGetItem(page, PageGetItemId(page, offset));
PageGetItem(page, PageGetItemId(page, offset));

if (innerTuple->tupstate != SPGIST_LIVE)
{
Expand Down Expand Up @@ -974,7 +974,7 @@ storeGettuple(SpGistScanOpaque so, ItemPointer heapPtr,
else
{
IndexOrderByDistance *distances =
palloc(sizeof(distances[0]) * so->numberOfOrderBys);
palloc(sizeof(distances[0]) * so->numberOfOrderBys);
int i;

for (i = 0; i < so->numberOfOrderBys; i++)
Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/table/tableam.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ TableScanDesc
table_beginscan_catalog(Relation relation, int nkeys, struct ScanKeyData *key)
{
uint32 flags = SO_TYPE_SEQSCAN |
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE | SO_TEMP_SNAPSHOT;
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE | SO_TEMP_SNAPSHOT;
Oid relid = RelationGetRelid(relation);
Snapshot snapshot = RegisterSnapshot(GetCatalogSnapshot(relid));

Expand Down Expand Up @@ -176,7 +176,7 @@ table_beginscan_parallel(Relation relation, ParallelTableScanDesc parallel_scan)
{
Snapshot snapshot;
uint32 flags = SO_TYPE_SEQSCAN |
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE;
SO_ALLOW_STRAT | SO_ALLOW_SYNC | SO_ALLOW_PAGEMODE;

Assert(RelationGetRelid(relation) == parallel_scan->phs_relid);

Expand Down
4 changes: 2 additions & 2 deletions src/backend/access/transam/generic_xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ GenericXLogFinish(GenericXLogState *state)
START_CRIT_SECTION();

/*
* Compute deltas if necessary, write changes to buffers, mark
* buffers dirty, and register changes.
* Compute deltas if necessary, write changes to buffers, mark buffers
* dirty, and register changes.
*/
for (i = 0; i < MAX_GENERIC_XLOG_PAGES; i++)
{
Expand Down
Loading