diff options
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r-- | src/backend/access/transam/twophase.c | 6 | ||||
-rw-r--r-- | src/backend/access/transam/xact.c | 10 | ||||
-rw-r--r-- | src/backend/access/transam/xlog.c | 39 |
3 files changed, 28 insertions, 27 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 5c05d545c46..cdd8156ce4d 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -913,7 +913,7 @@ typedef struct TwoPhaseFileHeader bool initfileinval; /* does relcache init file need invalidation? */ uint16 gidlen; /* length of the GID - GID follows the header */ XLogRecPtr origin_lsn; /* lsn of this record at origin node */ - TimestampTz origin_timestamp; /* time of prepare at origin node */ + TimestampTz origin_timestamp; /* time of prepare at origin node */ } TwoPhaseFileHeader; /* @@ -1065,7 +1065,7 @@ EndPrepare(GlobalTransaction gxact) { TwoPhaseFileHeader *hdr; StateFileChunk *record; - bool replorigin; + bool replorigin; /* Add the end sentinel to the list of 2PC records */ RegisterTwoPhaseRecord(TWOPHASE_RM_END_ID, 0, @@ -1317,7 +1317,7 @@ void ParsePrepareRecord(uint8 info, char *xlrec, xl_xact_parsed_prepare *parsed) { TwoPhaseFileHeader *hdr; - char *bufptr; + char *bufptr; hdr = (TwoPhaseFileHeader *) xlrec; bufptr = xlrec + MAXALIGN(sizeof(TwoPhaseFileHeader)); diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 4747353bb93..c38de0c5fe9 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -3267,8 +3267,8 @@ bool IsInTransactionBlock(bool isTopLevel) { /* - * Return true on same conditions that would make PreventInTransactionBlock - * error out + * Return true on same conditions that would make + * PreventInTransactionBlock error out */ if (IsTransactionBlock()) return true; @@ -5448,9 +5448,9 @@ XactLogAbortRecord(TimestampTz abort_time, } /* dump transaction origin information only for abort prepared */ - if ( (replorigin_session_origin != InvalidRepOriginId) && - TransactionIdIsValid(twophase_xid) && - XLogLogicalInfoActive()) + if ((replorigin_session_origin != InvalidRepOriginId) && + TransactionIdIsValid(twophase_xid) && + XLogLogicalInfoActive()) { xl_xinfo.xinfo |= XACT_XINFO_HAS_ORIGIN; diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 08dc9ba031b..c0923d97f21 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -10656,10 +10656,9 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, * Mark that start phase has correctly finished for an exclusive backup. * Session-level locks are updated as well to reflect that state. * - * Note that CHECK_FOR_INTERRUPTS() must not occur while updating - * backup counters and session-level lock. Otherwise they can be - * updated inconsistently, and which might cause do_pg_abort_backup() - * to fail. + * Note that CHECK_FOR_INTERRUPTS() must not occur while updating backup + * counters and session-level lock. Otherwise they can be updated + * inconsistently, and which might cause do_pg_abort_backup() to fail. */ if (exclusive) { @@ -10904,11 +10903,11 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) /* * Clean up session-level lock. * - * You might think that WALInsertLockRelease() can be called - * before cleaning up session-level lock because session-level - * lock doesn't need to be protected with WAL insertion lock. - * But since CHECK_FOR_INTERRUPTS() can occur in it, - * session-level lock must be cleaned up before it. + * You might think that WALInsertLockRelease() can be called before + * cleaning up session-level lock because session-level lock doesn't need + * to be protected with WAL insertion lock. But since + * CHECK_FOR_INTERRUPTS() can occur in it, session-level lock must be + * cleaned up before it. */ sessionBackupState = SESSION_BACKUP_NONE; @@ -11042,6 +11041,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) (uint32) (startpoint >> 32), (uint32) startpoint, startxlogfilename); fprintf(fp, "STOP WAL LOCATION: %X/%X (file %s)\n", (uint32) (stoppoint >> 32), (uint32) stoppoint, stopxlogfilename); + /* * Transfer remaining lines including label and start timeline to * history file. @@ -11259,7 +11259,8 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, bool *backupFromStandby) { char startxlogfilename[MAXFNAMELEN]; - TimeLineID tli_from_walseg, tli_from_file; + TimeLineID tli_from_walseg, + tli_from_file; FILE *lfp; char ch; char backuptype[20]; @@ -11322,13 +11323,13 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, } /* - * Parse START TIME and LABEL. Those are not mandatory fields for - * recovery but checking for their presence is useful for debugging - * and the next sanity checks. Cope also with the fact that the - * result buffers have a pre-allocated size, hence if the backup_label - * file has been generated with strings longer than the maximum assumed - * here an incorrect parsing happens. That's fine as only minor - * consistency checks are done afterwards. + * Parse START TIME and LABEL. Those are not mandatory fields for recovery + * but checking for their presence is useful for debugging and the next + * sanity checks. Cope also with the fact that the result buffers have a + * pre-allocated size, hence if the backup_label file has been generated + * with strings longer than the maximum assumed here an incorrect parsing + * happens. That's fine as only minor consistency checks are done + * afterwards. */ if (fscanf(lfp, "START TIME: %127[^\n]\n", backuptime) == 1) ereport(DEBUG1, @@ -11341,8 +11342,8 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, backuplabel, BACKUP_LABEL_FILE))); /* - * START TIMELINE is new as of 11. Its parsing is not mandatory, still - * use it as a sanity check if present. + * START TIMELINE is new as of 11. Its parsing is not mandatory, still use + * it as a sanity check if present. */ if (fscanf(lfp, "START TIMELINE: %u\n", &tli_from_file) == 1) { |