summaryrefslogtreecommitdiff
path: root/src/backend/replication
diff options
context:
space:
mode:
authorTom Lane2019-05-22 16:55:34 +0000
committerTom Lane2019-05-22 16:55:34 +0000
commitbe76af171cdb3e7465c4ef234af403f97ad79b7b (patch)
tree1fa62d2b7a6680a4237a1548f7002fa0b234b143 /src/backend/replication
parent66a4bad83aaa6613a45a00a488c04427f9969fb4 (diff)
Initial pgindent run for v12.
This is still using the 2.0 version of pg_bsd_indent. I thought it would be good to commit this separately, so as to document the differences between 2.0 and 2.1 behavior. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/replication')
-rw-r--r--src/backend/replication/libpqwalreceiver/libpqwalreceiver.c2
-rw-r--r--src/backend/replication/logical/reorderbuffer.c14
-rw-r--r--src/backend/replication/slotfuncs.c10
-rw-r--r--src/backend/replication/syncrep.c5
-rw-r--r--src/backend/replication/walreceiver.c10
-rw-r--r--src/backend/replication/walsender.c6
6 files changed, 23 insertions, 24 deletions
diff --git a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
index 765d58d120c..b455c59cd70 100644
--- a/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
+++ b/src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
@@ -57,7 +57,7 @@ static void libpqrcv_get_senderinfo(WalReceiverConn *conn,
char **sender_host, int *sender_port);
static char *libpqrcv_identify_system(WalReceiverConn *conn,
TimeLineID *primary_tli);
-static int libpqrcv_server_version(WalReceiverConn *conn);
+static int libpqrcv_server_version(WalReceiverConn *conn);
static void libpqrcv_readtimelinehistoryfile(WalReceiverConn *conn,
TimeLineID tli, char **filename,
char **content, int *len);
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 65f86ad73db..acebf5893e9 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -468,8 +468,8 @@ ReorderBufferReturnTupleBuf(ReorderBuffer *rb, ReorderBufferTupleBuf *tuple)
Oid *
ReorderBufferGetRelids(ReorderBuffer *rb, int nrelids)
{
- Oid *relids;
- Size alloc_len;
+ Oid *relids;
+ Size alloc_len;
alloc_len = sizeof(Oid) * nrelids;
@@ -1327,8 +1327,8 @@ ReorderBufferBuildTupleCidHash(ReorderBuffer *rb, ReorderBufferTXN *txn)
else
{
/*
- * Maybe we already saw this tuple before in this transaction,
- * but if so it must have the same cmin.
+ * Maybe we already saw this tuple before in this transaction, but
+ * if so it must have the same cmin.
*/
Assert(ent->cmin == change->data.tuplecid.cmin);
@@ -2464,8 +2464,8 @@ ReorderBufferSerializeChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
}
case REORDER_BUFFER_CHANGE_TRUNCATE:
{
- Size size;
- char *data;
+ Size size;
+ char *data;
/* account for the OIDs of truncated relations */
size = sizeof(Oid) * change->data.truncate.nrelids;
@@ -2767,7 +2767,7 @@ ReorderBufferRestoreChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
/* the base struct contains all the data, easy peasy */
case REORDER_BUFFER_CHANGE_TRUNCATE:
{
- Oid *relids;
+ Oid *relids;
relids = ReorderBufferGetRelids(rb,
change->data.truncate.nrelids);
diff --git a/src/backend/replication/slotfuncs.c b/src/backend/replication/slotfuncs.c
index 182fe5bc825..808a6f5b836 100644
--- a/src/backend/replication/slotfuncs.c
+++ b/src/backend/replication/slotfuncs.c
@@ -730,11 +730,11 @@ copy_replication_slot(FunctionCallInfo fcinfo, bool logical_slot)
SpinLockRelease(&src->mutex);
/*
- * Check if the source slot still exists and is valid. We regard it
- * as invalid if the type of replication slot or name has been
- * changed, or the restart_lsn either is invalid or has gone backward.
- * (The restart_lsn could go backwards if the source slot is dropped
- * and copied from an older slot during installation.)
+ * Check if the source slot still exists and is valid. We regard it as
+ * invalid if the type of replication slot or name has been changed,
+ * or the restart_lsn either is invalid or has gone backward. (The
+ * restart_lsn could go backwards if the source slot is dropped and
+ * copied from an older slot during installation.)
*
* Since erroring out will release and drop the destination slot we
* don't need to release it here.
diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c
index 6c160c13c6f..83734575c28 100644
--- a/src/backend/replication/syncrep.c
+++ b/src/backend/replication/syncrep.c
@@ -276,9 +276,8 @@ SyncRepWaitForLSN(XLogRecPtr lsn, bool commit)
WAIT_EVENT_SYNC_REP);
/*
- * If the postmaster dies, we'll probably never get an
- * acknowledgment, because all the wal sender processes will exit. So
- * just bail out.
+ * If the postmaster dies, we'll probably never get an acknowledgment,
+ * because all the wal sender processes will exit. So just bail out.
*/
if (rc & WL_POSTMASTER_DEATH)
{
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index d52ec7b2cf1..6abc7807783 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -808,11 +808,11 @@ WalRcvQuickDieHandler(SIGNAL_ARGS)
* anyway.
*
* Note we use _exit(2) not _exit(0). This is to force the postmaster
- * into a system reset cycle if someone sends a manual SIGQUIT to a
- * random backend. This is necessary precisely because we don't clean up
- * our shared memory state. (The "dead man switch" mechanism in
- * pmsignal.c should ensure the postmaster sees this as a crash, too, but
- * no harm in being doubly sure.)
+ * into a system reset cycle if someone sends a manual SIGQUIT to a random
+ * backend. This is necessary precisely because we don't clean up our
+ * shared memory state. (The "dead man switch" mechanism in pmsignal.c
+ * should ensure the postmaster sees this as a crash, too, but no harm in
+ * being doubly sure.)
*/
_exit(2);
}
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 8aa12ec9124..3f313680223 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -218,7 +218,7 @@ typedef struct
int write_head;
int read_heads[NUM_SYNC_REP_WAIT_MODE];
WalTimeSample last_read[NUM_SYNC_REP_WAIT_MODE];
-} LagTracker;
+} LagTracker;
static LagTracker *lag_tracker;
@@ -1407,7 +1407,7 @@ WalSndWaitForWal(XLogRecPtr loc)
sleeptime = WalSndComputeSleeptime(GetCurrentTimestamp());
wakeEvents = WL_LATCH_SET | WL_EXIT_ON_PM_DEATH |
- WL_SOCKET_READABLE | WL_TIMEOUT;
+ WL_SOCKET_READABLE | WL_TIMEOUT;
if (pq_is_send_pending())
wakeEvents |= WL_SOCKET_WRITEABLE;
@@ -2255,7 +2255,7 @@ WalSndLoop(WalSndSendDataCallback send_data)
int wakeEvents;
wakeEvents = WL_LATCH_SET | WL_EXIT_ON_PM_DEATH | WL_TIMEOUT |
- WL_SOCKET_READABLE;
+ WL_SOCKET_READABLE;
/*
* Use fresh timestamp, not last_processed, to reduce the chance