diff options
Diffstat (limited to 'src/bin/pg_basebackup')
| -rw-r--r-- | src/bin/pg_basebackup/pg_basebackup.c | 8 | ||||
| -rw-r--r-- | src/bin/pg_basebackup/pg_receivewal.c | 2 | ||||
| -rw-r--r-- | src/bin/pg_basebackup/pg_recvlogical.c | 6 | ||||
| -rw-r--r-- | src/bin/pg_basebackup/receivelog.c | 10 | ||||
| -rw-r--r-- | src/bin/pg_basebackup/receivelog.h | 7 | ||||
| -rw-r--r-- | src/bin/pg_basebackup/streamutil.h | 2 |
6 files changed, 17 insertions, 18 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 54d27dc658..2c4efd7645 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -87,7 +87,7 @@ static IncludeWal includewal = STREAM_WAL; static bool fastcheckpoint = false; static bool writerecoveryconf = false; static bool do_sync = true; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static pg_time_t last_progress_report = 0; static int32 maxrate = 0; /* no limit by default */ static char *replication_slot = NULL; @@ -1398,7 +1398,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) /* * Directory */ - filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ + filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ if (mkdir(filename, S_IRWXU) != 0) { /* @@ -1442,7 +1442,7 @@ ReceiveAndUnpackTarFile(PGconn *conn, PGresult *res, int rownum) * are, you can call it an undocumented feature that you * can map them too.) */ - filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ + filename[strlen(filename) - 1] = '\0'; /* Remove trailing slash */ mapped_tblspc_path = get_tablespace_mapping(©buf[157]); if (symlink(mapped_tblspc_path, filename) != 0) @@ -2204,7 +2204,7 @@ main(int argc, char **argv) #ifdef HAVE_LIBZ compresslevel = Z_DEFAULT_COMPRESSION; #else - compresslevel = 1; /* will be rejected below */ + compresslevel = 1; /* will be rejected below */ #endif break; case 'Z': diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 370d871660..15caf32a76 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -35,7 +35,7 @@ static char *basedir = NULL; static int verbose = 0; static int compresslevel = 0; static int noloop = 0; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static volatile bool time_to_abort = false; static bool do_create_slot = false; static bool slot_exists_ok = false; diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index 5f7412e9d5..fbe9fbb9a8 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -37,7 +37,7 @@ static char *outfile = NULL; static int verbose = 0; static int noloop = 0; -static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ +static int standby_message_timeout = 10 * 1000; /* 10 sec = default */ static int fsync_interval = 10 * 1000; /* 10 sec = default */ static XLogRecPtr startpos = InvalidXLogRecPtr; static XLogRecPtr endpos = InvalidXLogRecPtr; @@ -142,13 +142,13 @@ sendFeedback(PGconn *conn, TimestampTz now, bool force, bool replyRequested) len += 1; fe_sendint64(output_written_lsn, &replybuf[len]); /* write */ len += 8; - fe_sendint64(output_fsync_lsn, &replybuf[len]); /* flush */ + fe_sendint64(output_fsync_lsn, &replybuf[len]); /* flush */ len += 8; fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */ len += 8; fe_sendint64(now, &replybuf[len]); /* sendTime */ len += 8; - replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ + replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ len += 1; startpos = output_written_lsn; diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c index 52aa274bb8..0fe4df126d 100644 --- a/src/bin/pg_basebackup/receivelog.c +++ b/src/bin/pg_basebackup/receivelog.c @@ -35,7 +35,7 @@ static char current_walfile_name[MAXPGPATH] = ""; static bool reportFlushPosition = false; static XLogRecPtr lastFlushPosition = InvalidXLogRecPtr; -static bool still_sending = true; /* feedback still needs to be sent? */ +static bool still_sending = true; /* feedback still needs to be sent? */ static PGresult *HandleCopyStream(PGconn *conn, StreamCtl *stream, XLogRecPtr *stoppos); @@ -330,18 +330,18 @@ sendFeedback(PGconn *conn, XLogRecPtr blockpos, TimestampTz now, bool replyReque replybuf[len] = 'r'; len += 1; - fe_sendint64(blockpos, &replybuf[len]); /* write */ + fe_sendint64(blockpos, &replybuf[len]); /* write */ len += 8; if (reportFlushPosition) - fe_sendint64(lastFlushPosition, &replybuf[len]); /* flush */ + fe_sendint64(lastFlushPosition, &replybuf[len]); /* flush */ else - fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* flush */ + fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* flush */ len += 8; fe_sendint64(InvalidXLogRecPtr, &replybuf[len]); /* apply */ len += 8; fe_sendint64(now, &replybuf[len]); /* sendTime */ len += 8; - replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ + replybuf[len] = replyRequested ? 1 : 0; /* replyRequested */ len += 1; if (PQputCopyData(conn, replybuf, len) <= 0 || PQflush(conn)) diff --git a/src/bin/pg_basebackup/receivelog.h b/src/bin/pg_basebackup/receivelog.h index 9a51d9a9c4..bb786ce289 100644 --- a/src/bin/pg_basebackup/receivelog.h +++ b/src/bin/pg_basebackup/receivelog.h @@ -33,8 +33,7 @@ typedef struct StreamCtl TimeLineID timeline; /* Timeline to stream data from */ char *sysidentifier; /* Validate this system identifier and * timeline */ - int standby_message_timeout; /* Send status messages this - * often */ + int standby_message_timeout; /* Send status messages this often */ bool synchronous; /* Flush immediately WAL data on write */ bool mark_done; /* Mark segment as done in generated archive */ bool do_sync; /* Flush to disk to ensure consistent state of @@ -47,7 +46,7 @@ typedef struct StreamCtl WalWriteMethod *walmethod; /* How to write the WAL */ char *partial_suffix; /* Suffix appended to partially received files */ - char *replication_slot; /* Replication slot to use, or NULL */ + char *replication_slot; /* Replication slot to use, or NULL */ bool temp_slot; /* Create temporary replication slot */ } StreamCtl; @@ -57,4 +56,4 @@ extern bool CheckServerVersionForStreaming(PGconn *conn); extern bool ReceiveXlogStream(PGconn *conn, StreamCtl *stream); -#endif /* RECEIVELOG_H */ +#endif /* RECEIVELOG_H */ diff --git a/src/bin/pg_basebackup/streamutil.h b/src/bin/pg_basebackup/streamutil.h index 460dcb5267..6f6878679f 100644 --- a/src/bin/pg_basebackup/streamutil.h +++ b/src/bin/pg_basebackup/streamutil.h @@ -48,4 +48,4 @@ extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz sto extern void fe_sendint64(int64 i, char *buf); extern int64 fe_recvint64(char *buf); -#endif /* STREAMUTIL_H */ +#endif /* STREAMUTIL_H */ |
