diff options
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r-- | src/backend/access/transam/commit_ts.c | 14 | ||||
-rw-r--r-- | src/backend/access/transam/generic_xlog.c | 5 | ||||
-rw-r--r-- | src/backend/access/transam/multixact.c | 8 | ||||
-rw-r--r-- | src/backend/access/transam/parallel.c | 20 | ||||
-rw-r--r-- | src/backend/access/transam/slru.c | 4 | ||||
-rw-r--r-- | src/backend/access/transam/subtrans.c | 2 | ||||
-rw-r--r-- | src/backend/access/transam/twophase.c | 63 | ||||
-rw-r--r-- | src/backend/access/transam/xact.c | 24 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 62 | ||||
-rw-r--r-- | src/backend/access/transam/xlogfuncs.c | 41 | ||||
-rw-r--r-- | src/backend/access/transam/xlogreader.c | 4 |
11 files changed, 121 insertions, 126 deletions
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 17134396a4b..e330105217d 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -92,7 +92,7 @@ typedef struct CommitTimestampShared { TransactionId xidLastCommit; CommitTimestampEntry dataLastCommit; - bool commitTsActive; + bool commitTsActive; } CommitTimestampShared; CommitTimestampShared *commitTsShared; @@ -153,9 +153,9 @@ TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids, * No-op if the module is not active. * * An unlocked read here is fine, because in a standby (the only place - * where the flag can change in flight) this routine is only called by - * the recovery process, which is also the only process which can change - * the flag. + * where the flag can change in flight) this routine is only called by the + * recovery process, which is also the only process which can change the + * flag. */ if (!commitTsShared->commitTsActive) return; @@ -767,8 +767,8 @@ ExtendCommitTs(TransactionId newestXact) int pageno; /* - * Nothing to do if module not enabled. Note we do an unlocked read of the - * flag here, which is okay because this routine is only called from + * Nothing to do if module not enabled. Note we do an unlocked read of + * the flag here, which is okay because this routine is only called from * GetNewTransactionId, which is never called in a standby. */ Assert(!InRecovery); @@ -855,7 +855,7 @@ AdvanceOldestCommitTsXid(TransactionId oldestXact) { LWLockAcquire(CommitTsLock, LW_EXCLUSIVE); if (ShmemVariableCache->oldestCommitTsXid != InvalidTransactionId && - TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact)) + TransactionIdPrecedes(ShmemVariableCache->oldestCommitTsXid, oldestXact)) ShmemVariableCache->oldestCommitTsXid = oldestXact; LWLockRelease(CommitTsLock); } diff --git a/src/backend/access/transam/generic_xlog.c b/src/backend/access/transam/generic_xlog.c index c33e7beb6a4..1926d98de00 100644 --- a/src/backend/access/transam/generic_xlog.c +++ b/src/backend/access/transam/generic_xlog.c @@ -52,9 +52,8 @@ typedef struct Buffer buffer; /* registered buffer */ int flags; /* flags for this buffer */ int deltaLen; /* space consumed in delta field */ - char *image; /* copy of page image for modification, - * do not do it in-place to have aligned - * memory chunk */ + char *image; /* copy of page image for modification, do not + * do it in-place to have aligned memory chunk */ char delta[MAX_DELTA_SIZE]; /* delta between page images */ } PageData; diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index a677af00496..7bccca8a17b 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -988,8 +988,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) char *oldest_datname = get_database_name(oldest_datoid); /* - * Immediately kick autovacuum into action as we're already - * in ERROR territory. + * Immediately kick autovacuum into action as we're already in + * ERROR territory. */ SendPostmasterSignal(PMSIGNAL_START_AUTOVAC_LAUNCHER); @@ -1134,8 +1134,8 @@ GetNewMultiXactId(int nmembers, MultiXactOffset *offset) (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), errmsg_plural("database with OID %u must be vacuumed before %d more multixact member is used", "database with OID %u must be vacuumed before %d more multixact members are used", - MultiXactState->offsetStopLimit - nextOffset + nmembers, - MultiXactState->oldestMultiXactDB, + MultiXactState->offsetStopLimit - nextOffset + nmembers, + MultiXactState->oldestMultiXactDB, MultiXactState->offsetStopLimit - nextOffset + nmembers), errhint("Execute a database-wide VACUUM in that database with reduced vacuum_multixact_freeze_min_age and vacuum_multixact_freeze_table_age settings."))); diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c index 934dba88c66..74a483e0fd9 100644 --- a/src/backend/access/transam/parallel.c +++ b/src/backend/access/transam/parallel.c @@ -134,9 +134,9 @@ CreateParallelContext(parallel_worker_main_type entrypoint, int nworkers) nworkers = 0; /* - * If we are running under serializable isolation, we can't use - * parallel workers, at least not until somebody enhances that mechanism - * to be parallel-aware. + * If we are running under serializable isolation, we can't use parallel + * workers, at least not until somebody enhances that mechanism to be + * parallel-aware. */ if (IsolationIsSerializable()) nworkers = 0; @@ -646,9 +646,9 @@ DestroyParallelContext(ParallelContext *pcxt) } /* - * We can't finish transaction commit or abort until all of the - * workers have exited. This means, in particular, that we can't respond - * to interrupts at this stage. + * We can't finish transaction commit or abort until all of the workers + * have exited. This means, in particular, that we can't respond to + * interrupts at this stage. */ HOLD_INTERRUPTS(); WaitForParallelWorkersToExit(pcxt); @@ -918,7 +918,7 @@ ParallelWorkerMain(Datum main_arg) if (toc == NULL) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("invalid magic number in dynamic shared memory segment"))); + errmsg("invalid magic number in dynamic shared memory segment"))); /* Look up fixed parallel state. */ fps = shm_toc_lookup(toc, PARALLEL_KEY_FIXED); @@ -958,9 +958,9 @@ ParallelWorkerMain(Datum main_arg) */ /* - * Join locking group. We must do this before anything that could try - * to acquire a heavyweight lock, because any heavyweight locks acquired - * to this point could block either directly against the parallel group + * Join locking group. We must do this before anything that could try to + * acquire a heavyweight lock, because any heavyweight locks acquired to + * this point could block either directly against the parallel group * leader or against some process which in turn waits for a lock that * conflicts with the parallel group leader, causing an undetected * deadlock. (If we can't join the lock group, the leader has gone away, diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 36a011cc94e..bbae5847f2d 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -152,7 +152,7 @@ SimpleLruShmemSize(int nslots, int nlsns) sz += MAXALIGN(nslots * sizeof(bool)); /* page_dirty[] */ sz += MAXALIGN(nslots * sizeof(int)); /* page_number[] */ sz += MAXALIGN(nslots * sizeof(int)); /* page_lru_count[] */ - sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */ + sz += MAXALIGN(nslots * sizeof(LWLockPadded)); /* buffer_locks[] */ if (nlsns > 0) sz += MAXALIGN(nslots * nlsns * sizeof(XLogRecPtr)); /* group_lsn[] */ @@ -224,7 +224,7 @@ SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns, for (slotno = 0; slotno < nslots; slotno++) { LWLockInitialize(&shared->buffer_locks[slotno].lock, - shared->lwlock_tranche_id); + shared->lwlock_tranche_id); shared->page_buffer[slotno] = ptr; shared->page_status[slotno] = SLRU_PAGE_EMPTY; diff --git a/src/backend/access/transam/subtrans.c b/src/backend/access/transam/subtrans.c index c02046c0730..908fe2d5331 100644 --- a/src/backend/access/transam/subtrans.c +++ b/src/backend/access/transam/subtrans.c @@ -257,7 +257,7 @@ StartupSUBTRANS(TransactionId oldestActiveXID) startPage++; /* must account for wraparound */ if (startPage > TransactionIdToPage(MaxTransactionId)) - startPage=0; + startPage = 0; } (void) ZeroSUBTRANSPage(startPage); diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index a65048b683b..06aedd40bf1 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -140,13 +140,13 @@ typedef struct GlobalTransactionData TimestampTz prepared_at; /* time of preparation */ /* - * Note that we need to keep track of two LSNs for each GXACT. - * We keep track of the start LSN because this is the address we must - * use to read state data back from WAL when committing a prepared GXACT. - * We keep track of the end LSN because that is the LSN we need to wait - * for prior to commit. + * Note that we need to keep track of two LSNs for each GXACT. We keep + * track of the start LSN because this is the address we must use to read + * state data back from WAL when committing a prepared GXACT. We keep + * track of the end LSN because that is the LSN we need to wait for prior + * to commit. */ - XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */ + XLogRecPtr prepare_start_lsn; /* XLOG offset of prepare record start */ XLogRecPtr prepare_end_lsn; /* XLOG offset of prepare record end */ Oid owner; /* ID of user that executed the xact */ @@ -980,7 +980,7 @@ StartPrepare(GlobalTransaction gxact) hdr.nabortrels = smgrGetPendingDeletes(false, &abortrels); hdr.ninvalmsgs = xactGetCommittedInvalidationMessages(&invalmsgs, &hdr.initfileinval); - hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */ + hdr.gidlen = strlen(gxact->gid) + 1; /* Include '\0' */ save_state_data(&hdr, sizeof(TwoPhaseFileHeader)); save_state_data(gxact->gid, hdr.gidlen); @@ -1259,28 +1259,28 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len) ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), errmsg("out of memory"), - errdetail("Failed while allocating an XLog reading processor."))); + errdetail("Failed while allocating an XLog reading processor."))); record = XLogReadRecord(xlogreader, lsn, &errormsg); if (record == NULL) ereport(ERROR, (errcode_for_file_access(), errmsg("could not read two-phase state from xlog at %X/%X", - (uint32) (lsn >> 32), - (uint32) lsn))); + (uint32) (lsn >> 32), + (uint32) lsn))); if (XLogRecGetRmid(xlogreader) != RM_XACT_ID || (XLogRecGetInfo(xlogreader) & XLOG_XACT_OPMASK) != XLOG_XACT_PREPARE) ereport(ERROR, (errcode_for_file_access(), errmsg("expected two-phase state data is not present in xlog at %X/%X", - (uint32) (lsn >> 32), - (uint32) lsn))); + (uint32) (lsn >> 32), + (uint32) lsn))); if (len != NULL) *len = XLogRecGetDataLen(xlogreader); - *buf = palloc(sizeof(char)*XLogRecGetDataLen(xlogreader)); + *buf = palloc(sizeof(char) * XLogRecGetDataLen(xlogreader)); memcpy(*buf, XLogRecGetData(xlogreader), sizeof(char) * XLogRecGetDataLen(xlogreader)); XLogReaderFree(xlogreader); @@ -1347,10 +1347,9 @@ FinishPreparedTransaction(const char *gid, bool isCommit) xid = pgxact->xid; /* - * Read and validate 2PC state data. - * State data will typically be stored in WAL files if the LSN is after the - * last checkpoint record, or moved to disk if for some reason they have - * lived for a long time. + * Read and validate 2PC state data. State data will typically be stored + * in WAL files if the LSN is after the last checkpoint record, or moved + * to disk if for some reason they have lived for a long time. */ if (gxact->ondisk) buf = ReadTwoPhaseFile(xid, true); @@ -1605,22 +1604,20 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon) TRACE_POSTGRESQL_TWOPHASE_CHECKPOINT_START(); /* - * We are expecting there to be zero GXACTs that need to be - * copied to disk, so we perform all I/O while holding - * TwoPhaseStateLock for simplicity. This prevents any new xacts - * from preparing while this occurs, which shouldn't be a problem - * since the presence of long-lived prepared xacts indicates the - * transaction manager isn't active. + * We are expecting there to be zero GXACTs that need to be copied to + * disk, so we perform all I/O while holding TwoPhaseStateLock for + * simplicity. This prevents any new xacts from preparing while this + * occurs, which shouldn't be a problem since the presence of long-lived + * prepared xacts indicates the transaction manager isn't active. * - * It's also possible to move I/O out of the lock, but on - * every error we should check whether somebody committed our - * transaction in different backend. Let's leave this optimisation - * for future, if somebody will spot that this place cause - * bottleneck. + * It's also possible to move I/O out of the lock, but on every error we + * should check whether somebody committed our transaction in different + * backend. Let's leave this optimisation for future, if somebody will + * spot that this place cause bottleneck. * - * Note that it isn't possible for there to be a GXACT with - * a prepare_end_lsn set prior to the last checkpoint yet - * is marked invalid, because of the efforts with delayChkpt. + * Note that it isn't possible for there to be a GXACT with a + * prepare_end_lsn set prior to the last checkpoint yet is marked invalid, + * because of the efforts with delayChkpt. */ LWLockAcquire(TwoPhaseStateLock, LW_SHARED); for (i = 0; i < TwoPhaseState->numPrepXacts; i++) @@ -1633,7 +1630,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon) gxact->prepare_end_lsn <= redo_horizon) { char *buf; - int len; + int len; XlogReadTwoPhaseData(gxact->prepare_start_lsn, &buf, &len); RecreateTwoPhaseFile(pgxact->xid, buf, len); @@ -1920,7 +1917,7 @@ RecoverPreparedTransactions(void) TwoPhaseFileHeader *hdr; TransactionId *subxids; GlobalTransaction gxact; - const char *gid; + const char *gid; int i; xid = (TransactionId) strtoul(clde->d_name, NULL, 16); diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 95690ff36cb..23f36ead7e5 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -1166,19 +1166,19 @@ RecordTransactionCommit(void) /* * Transactions without an assigned xid can contain invalidation * messages (e.g. explicit relcache invalidations or catcache - * invalidations for inplace updates); standbys need to process - * those. We can't emit a commit record without an xid, and we don't - * want to force assigning an xid, because that'd be problematic for - * e.g. vacuum. Hence we emit a bespoke record for the - * invalidations. We don't want to use that in case a commit record is - * emitted, so they happen synchronously with commits (besides not - * wanting to emit more WAL recoreds). + * invalidations for inplace updates); standbys need to process those. + * We can't emit a commit record without an xid, and we don't want to + * force assigning an xid, because that'd be problematic for e.g. + * vacuum. Hence we emit a bespoke record for the invalidations. We + * don't want to use that in case a commit record is emitted, so they + * happen synchronously with commits (besides not wanting to emit more + * WAL recoreds). */ if (nmsgs != 0) { LogStandbyInvalidations(nmsgs, invalMessages, RelcacheInitFileInval); - wrote_xlog = true; /* not strictly necessary */ + wrote_xlog = true; /* not strictly necessary */ } /* @@ -1272,8 +1272,8 @@ RecordTransactionCommit(void) * this case, but we don't currently try to do that. It would certainly * cause problems at least in Hot Standby mode, where the * KnownAssignedXids machinery requires tracking every XID assignment. It - * might be OK to skip it only when wal_level < replica, but for now - * we don't.) + * might be OK to skip it only when wal_level < replica, but for now we + * don't.) * * However, if we're doing cleanup of any non-temp rels or committing any * command that wanted to force sync commit, then we must flush XLOG @@ -5486,8 +5486,8 @@ xact_redo_commit(xl_xact_parsed_commit *parsed, /* * If asked by the primary (because someone is waiting for a synchronous - * commit = remote_apply), we will need to ask walreceiver to send a - * reply immediately. + * commit = remote_apply), we will need to ask walreceiver to send a reply + * immediately. */ if (XactCompletionApplyFeedback(parsed->xinfo)) XLogRequestWalReceiverReply(); diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index b473f1914e8..e4645a31691 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5004,9 +5004,9 @@ readRecoveryCommandFile(void) else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for recovery parameter \"%s\": \"%s\"", - "recovery_target_action", - item->value), + errmsg("invalid value for recovery parameter \"%s\": \"%s\"", + "recovery_target_action", + item->value), errhint("Valid values are \"pause\", \"promote\", and \"shutdown\"."))); ereport(DEBUG2, @@ -5087,9 +5087,9 @@ readRecoveryCommandFile(void) else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for recovery parameter \"%s\": \"%s\"", - "recovery_target", - item->value), + errmsg("invalid value for recovery parameter \"%s\": \"%s\"", + "recovery_target", + item->value), errhint("The only allowed value is \"immediate\"."))); ereport(DEBUG2, (errmsg_internal("recovery_target = '%s'", @@ -5880,8 +5880,8 @@ CheckRequiredParameterValues(void) } /* - * For Hot Standby, the WAL must be generated with 'replica' mode, and - * we must have at least as many backend slots as the primary. + * For Hot Standby, the WAL must be generated with 'replica' mode, and we + * must have at least as many backend slots as the primary. */ if (ArchiveRecoveryRequested && EnableHotStandby) { @@ -6163,26 +6163,26 @@ StartupXLOG(void) * is no use of such file. There is no harm in retaining it, but it * is better to get rid of the map file so that we don't have any * redundant file in data directory and it will avoid any sort of - * confusion. It seems prudent though to just rename the file out - * of the way rather than delete it completely, also we ignore any - * error that occurs in rename operation as even if map file is - * present without backup_label file, it is harmless. + * confusion. It seems prudent though to just rename the file out of + * the way rather than delete it completely, also we ignore any error + * that occurs in rename operation as even if map file is present + * without backup_label file, it is harmless. */ if (stat(TABLESPACE_MAP, &st) == 0) { unlink(TABLESPACE_MAP_OLD); if (durable_rename(TABLESPACE_MAP, TABLESPACE_MAP_OLD, DEBUG1) == 0) ereport(LOG, - (errmsg("ignoring file \"%s\" because no file \"%s\" exists", - TABLESPACE_MAP, BACKUP_LABEL_FILE), - errdetail("File \"%s\" was renamed to \"%s\".", - TABLESPACE_MAP, TABLESPACE_MAP_OLD))); + (errmsg("ignoring file \"%s\" because no file \"%s\" exists", + TABLESPACE_MAP, BACKUP_LABEL_FILE), + errdetail("File \"%s\" was renamed to \"%s\".", + TABLESPACE_MAP, TABLESPACE_MAP_OLD))); else ereport(LOG, - (errmsg("ignoring file \"%s\" because no file \"%s\" exists", - TABLESPACE_MAP, BACKUP_LABEL_FILE), - errdetail("Could not rename file \"%s\" to \"%s\": %m.", - TABLESPACE_MAP, TABLESPACE_MAP_OLD))); + (errmsg("ignoring file \"%s\" because no file \"%s\" exists", + TABLESPACE_MAP, BACKUP_LABEL_FILE), + errdetail("Could not rename file \"%s\" to \"%s\": %m.", + TABLESPACE_MAP, TABLESPACE_MAP_OLD))); } /* @@ -6314,24 +6314,24 @@ StartupXLOG(void) ereport(DEBUG1, (errmsg_internal("redo record is at %X/%X; shutdown %s", (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo, - wasShutdown ? "TRUE" : "FALSE"))); + wasShutdown ? "TRUE" : "FALSE"))); ereport(DEBUG1, (errmsg_internal("next transaction ID: %u:%u; next OID: %u", - checkPoint.nextXidEpoch, checkPoint.nextXid, - checkPoint.nextOid))); + checkPoint.nextXidEpoch, checkPoint.nextXid, + checkPoint.nextOid))); ereport(DEBUG1, (errmsg_internal("next MultiXactId: %u; next MultiXactOffset: %u", - checkPoint.nextMulti, checkPoint.nextMultiOffset))); + checkPoint.nextMulti, checkPoint.nextMultiOffset))); ereport(DEBUG1, - (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u", - checkPoint.oldestXid, checkPoint.oldestXidDB))); + (errmsg_internal("oldest unfrozen transaction ID: %u, in database %u", + checkPoint.oldestXid, checkPoint.oldestXidDB))); ereport(DEBUG1, (errmsg_internal("oldest MultiXactId: %u, in database %u", - checkPoint.oldestMulti, checkPoint.oldestMultiDB))); + checkPoint.oldestMulti, checkPoint.oldestMultiDB))); ereport(DEBUG1, (errmsg_internal("commit timestamp Xid oldest/newest: %u/%u", - checkPoint.oldestCommitTsXid, - checkPoint.newestCommitTsXid))); + checkPoint.oldestCommitTsXid, + checkPoint.newestCommitTsXid))); if (!TransactionIdIsNormal(checkPoint.nextXid)) ereport(PANIC, (errmsg("invalid next transaction ID"))); @@ -6883,8 +6883,8 @@ StartupXLOG(void) SpinLockRelease(&XLogCtl->info_lck); /* - * If rm_redo called XLogRequestWalReceiverReply, then we - * wake up the receiver so that it notices the updated + * If rm_redo called XLogRequestWalReceiverReply, then we wake + * up the receiver so that it notices the updated * lastReplayedEndRecPtr and sends a reply to the master. */ if (doRequestWalReceiverReply) diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index de493fad7a4..33383b4dccb 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -104,8 +104,8 @@ pg_start_backup(PG_FUNCTION_ARGS) MemoryContext oldcontext; /* - * Label file and tablespace map file need to be long-lived, since they - * are read in pg_stop_backup. + * Label file and tablespace map file need to be long-lived, since + * they are read in pg_stop_backup. */ oldcontext = MemoryContextSwitchTo(TopMemoryContext); label_file = makeStringInfo(); @@ -113,7 +113,7 @@ pg_start_backup(PG_FUNCTION_ARGS) MemoryContextSwitchTo(oldcontext); startpoint = do_pg_start_backup(backupidstr, fast, NULL, label_file, - dir, NULL, tblspc_map_file, false, true); + dir, NULL, tblspc_map_file, false, true); nonexclusive_backup_running = true; before_shmem_exit(nonexclusive_base_backup_cleanup, (Datum) 0); @@ -138,8 +138,8 @@ pg_start_backup(PG_FUNCTION_ARGS) * Note: different from CancelBackup which just cancels online backup mode. * * Note: this version is only called to stop an exclusive backup. The function - * pg_stop_backup_v2 (overloaded as pg_stop_backup in SQL) is called to - * stop non-exclusive backups. + * pg_stop_backup_v2 (overloaded as pg_stop_backup in SQL) is called to + * stop non-exclusive backups. * * Permission checking for this function is managed through the normal * GRANT system. @@ -156,10 +156,10 @@ pg_stop_backup(PG_FUNCTION_ARGS) errhint("Did you mean to use pg_stop_backup('f')?"))); /* - * Exclusive backups were typically started in a different connection, - * so don't try to verify that exclusive_backup_running is set in this one. - * Actual verification that an exclusive backup is in fact running is handled - * inside do_pg_stop_backup. + * Exclusive backups were typically started in a different connection, so + * don't try to verify that exclusive_backup_running is set in this one. + * Actual verification that an exclusive backup is in fact running is + * handled inside do_pg_stop_backup. */ stoppoint = do_pg_stop_backup(NULL, true, NULL); @@ -182,16 +182,16 @@ pg_stop_backup(PG_FUNCTION_ARGS) Datum pg_stop_backup_v2(PG_FUNCTION_ARGS) { - ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo; - TupleDesc tupdesc; + ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo; + TupleDesc tupdesc; Tuplestorestate *tupstore; - MemoryContext per_query_ctx; - MemoryContext oldcontext; - Datum values[3]; - bool nulls[3]; + MemoryContext per_query_ctx; + MemoryContext oldcontext; + Datum values[3]; + bool nulls[3]; - bool exclusive = PG_GETARG_BOOL(0); - XLogRecPtr stoppoint; + bool exclusive = PG_GETARG_BOOL(0); + XLogRecPtr stoppoint; /* check to see if caller supports us returning a tuplestore */ if (rsinfo == NULL || !IsA(rsinfo, ReturnSetInfo)) @@ -248,9 +248,8 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS) errhint("Did you mean to use pg_stop_backup('t')?"))); /* - * Stop the non-exclusive backup. Return a copy of the backup - * label and tablespace map so they can be written to disk by - * the caller. + * Stop the non-exclusive backup. Return a copy of the backup label + * and tablespace map so they can be written to disk by the caller. */ stoppoint = do_pg_stop_backup(label_file->data, true, NULL); nonexclusive_backup_running = false; @@ -269,7 +268,7 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS) } /* Stoppoint is included on both exclusive and nonexclusive backups */ - values[0] = LSNGetDatum(stoppoint); + values[0] = LSNGetDatum(stoppoint); tuplestore_putvalues(tupstore, tupdesc, values, nulls); tuplestore_donestoring(typstore); diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index c3aecc75746..dcf747c6334 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -322,7 +322,7 @@ XLogReadRecord(XLogReaderState *state, XLogRecPtr RecPtr, char **errormsg) if (total_len < SizeOfXLogRecord) { report_invalid_record(state, - "invalid record length at %X/%X: wanted %u, got %u", + "invalid record length at %X/%X: wanted %u, got %u", (uint32) (RecPtr >> 32), (uint32) RecPtr, (uint32) SizeOfXLogRecord, total_len); goto err; @@ -621,7 +621,7 @@ ValidXLogRecordHeader(XLogReaderState *state, XLogRecPtr RecPtr, if (record->xl_tot_len < SizeOfXLogRecord) { report_invalid_record(state, - "invalid record length at %X/%X: wanted %u, got %u", + "invalid record length at %X/%X: wanted %u, got %u", (uint32) (RecPtr >> 32), (uint32) RecPtr, (uint32) SizeOfXLogRecord, record->xl_tot_len); return false; |