aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
committerRobert Haas <rhaas@postgresql.org>2016-06-09 18:02:36 -0400
commit4bc424b968058c7f0aa685821d7039e86faac99c (patch)
treea4e245ae67bd11edb3926ff5fb3b0223438ac283 /src/backend/replication/logical
parent9164deea2f4ac90ee5e008ff41fc5ad4423887b2 (diff)
downloadpostgresql-4bc424b968058c7f0aa685821d7039e86faac99c.tar.gz
postgresql-4bc424b968058c7f0aa685821d7039e86faac99c.zip
pgindent run for 9.6
Diffstat (limited to 'src/backend/replication/logical')
-rw-r--r--src/backend/replication/logical/decode.c19
-rw-r--r--src/backend/replication/logical/logical.c4
-rw-r--r--src/backend/replication/logical/message.c4
-rw-r--r--src/backend/replication/logical/origin.c2
-rw-r--r--src/backend/replication/logical/reorderbuffer.c16
5 files changed, 23 insertions, 22 deletions
diff --git a/src/backend/replication/logical/decode.c b/src/backend/replication/logical/decode.c
index 0c248f07e8f..46cd5ba1f2d 100644
--- a/src/backend/replication/logical/decode.c
+++ b/src/backend/replication/logical/decode.c
@@ -330,7 +330,7 @@ DecodeStandbyOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
case XLOG_INVALIDATIONS:
{
xl_invalidations *invalidations =
- (xl_invalidations *) XLogRecGetData(r);
+ (xl_invalidations *) XLogRecGetData(r);
ReorderBufferImmediateInvalidation(
ctx->reorder, invalidations->nmsgs, invalidations->msgs);
@@ -488,12 +488,12 @@ FilterByOrigin(LogicalDecodingContext *ctx, RepOriginId origin_id)
static void
DecodeLogicalMsgOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
{
- SnapBuild *builder = ctx->snapshot_builder;
+ SnapBuild *builder = ctx->snapshot_builder;
XLogReaderState *r = buf->record;
- TransactionId xid = XLogRecGetXid(r);
- uint8 info = XLogRecGetInfo(r) & ~XLR_INFO_MASK;
- RepOriginId origin_id = XLogRecGetOrigin(r);
- Snapshot snapshot;
+ TransactionId xid = XLogRecGetXid(r);
+ uint8 info = XLogRecGetInfo(r) & ~XLR_INFO_MASK;
+ RepOriginId origin_id = XLogRecGetOrigin(r);
+ Snapshot snapshot;
xl_logical_message *message;
if (info != XLOG_LOGICAL_MESSAGE)
@@ -522,7 +522,8 @@ DecodeLogicalMsgOp(LogicalDecodingContext *ctx, XLogRecordBuffer *buf)
snapshot = SnapBuildGetOrBuildSnapshot(builder, xid);
ReorderBufferQueueMessage(ctx->reorder, xid, snapshot, buf->endptr,
message->transactional,
- message->message, /* first part of message is prefix */
+ message->message, /* first part of message is
+ * prefix */
message->message_size,
message->message + message->prefix_size);
}
@@ -536,8 +537,8 @@ DecodeCommit(LogicalDecodingContext *ctx, XLogRecordBuffer *buf,
xl_xact_parsed_commit *parsed, TransactionId xid)
{
XLogRecPtr origin_lsn = InvalidXLogRecPtr;
- TimestampTz commit_time = parsed->xact_time;
- RepOriginId origin_id = XLogRecGetOrigin(buf->record);
+ TimestampTz commit_time = parsed->xact_time;
+ RepOriginId origin_id = XLogRecGetOrigin(buf->record);
int i;
if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN)
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c
index 5ccfd3105f0..7c8a777b339 100644
--- a/src/backend/replication/logical/logical.c
+++ b/src/backend/replication/logical/logical.c
@@ -63,8 +63,8 @@ static void commit_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
static void change_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
Relation relation, ReorderBufferChange *change);
static void message_cb_wrapper(ReorderBuffer *cache, ReorderBufferTXN *txn,
- XLogRecPtr message_lsn, bool transactional,
- const char *prefix, Size message_size, const char *message);
+ XLogRecPtr message_lsn, bool transactional,
+ const char *prefix, Size message_size, const char *message);
static void LoadOutputPlugin(OutputPluginCallbacks *callbacks, char *plugin);
diff --git a/src/backend/replication/logical/message.c b/src/backend/replication/logical/message.c
index efcc25ae957..8f9dc2f47c6 100644
--- a/src/backend/replication/logical/message.c
+++ b/src/backend/replication/logical/message.c
@@ -51,7 +51,7 @@ XLogRecPtr
LogLogicalMessage(const char *prefix, const char *message, size_t size,
bool transactional)
{
- xl_logical_message xlrec;
+ xl_logical_message xlrec;
/*
* Force xid to be allocated if we're emitting a transactional message.
@@ -87,7 +87,7 @@ logicalmsg_redo(XLogReaderState *record)
uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
if (info != XLOG_LOGICAL_MESSAGE)
- elog(PANIC, "logicalmsg_redo: unknown op code %u", info);
+ elog(PANIC, "logicalmsg_redo: unknown op code %u", info);
/* This is only interesting for logical decoding, see decode.c. */
}
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index 9aeb2d85977..cc2b5132366 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -148,7 +148,7 @@ typedef struct ReplicationStateCtl
} ReplicationStateCtl;
/* external variables */
-RepOriginId replorigin_session_origin = InvalidRepOriginId; /* assumed identity */
+RepOriginId replorigin_session_origin = InvalidRepOriginId; /* assumed identity */
XLogRecPtr replorigin_session_origin_lsn = InvalidXLogRecPtr;
TimestampTz replorigin_session_origin_timestamp = 0;
diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c
index 52b0d41fa69..00e31a2d740 100644
--- a/src/backend/replication/logical/reorderbuffer.c
+++ b/src/backend/replication/logical/reorderbuffer.c
@@ -666,8 +666,8 @@ ReorderBufferQueueMessage(ReorderBuffer *rb, TransactionId xid,
}
else
{
- ReorderBufferTXN *txn = NULL;
- volatile Snapshot snapshot_now = snapshot;
+ ReorderBufferTXN *txn = NULL;
+ volatile Snapshot snapshot_now = snapshot;
if (xid != InvalidTransactionId)
txn = ReorderBufferTXNByXid(rb, xid, true, NULL, lsn, true);
@@ -1836,10 +1836,10 @@ ReorderBufferImmediateInvalidation(ReorderBuffer *rb, uint32 ninvalidations,
BeginInternalSubTransaction("replay");
/*
- * Force invalidations to happen outside of a valid transaction - that
- * way entries will just be marked as invalid without accessing the
- * catalog. That's advantageous because we don't need to setup the
- * full state necessary for catalog access.
+ * Force invalidations to happen outside of a valid transaction - that way
+ * entries will just be marked as invalid without accessing the catalog.
+ * That's advantageous because we don't need to setup the full state
+ * necessary for catalog access.
*/
if (use_subtxn)
AbortCurrentTransaction();
@@ -2543,14 +2543,14 @@ ReorderBufferRestoreChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
change->data.msg.prefix = MemoryContextAlloc(rb->context,
prefix_size);
memcpy(change->data.msg.prefix, data, prefix_size);
- Assert(change->data.msg.prefix[prefix_size-1] == '\0');
+ Assert(change->data.msg.prefix[prefix_size - 1] == '\0');
data += prefix_size;
/* read the messsage */
memcpy(&change->data.msg.message_size, data, sizeof(Size));
data += sizeof(Size);
change->data.msg.message = MemoryContextAlloc(rb->context,
- change->data.msg.message_size);
+ change->data.msg.message_size);
memcpy(change->data.msg.message, data,
change->data.msg.message_size);
data += change->data.msg.message_size;