summaryrefslogtreecommitdiff
path: root/src/include/replication
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:18:54 +0000
committerTom Lane2017-06-21 19:19:25 +0000
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/include/replication
parentf669c09989bda894d6ba01634ccb229f0687c08a (diff)
Phase 2 of pgindent updates.
Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/include/replication')
-rw-r--r--src/include/replication/basebackup.h2
-rw-r--r--src/include/replication/logicallauncher.h2
-rw-r--r--src/include/replication/logicalproto.h2
-rw-r--r--src/include/replication/logicalrelation.h4
-rw-r--r--src/include/replication/logicalworker.h2
-rw-r--r--src/include/replication/message.h2
-rw-r--r--src/include/replication/origin.h2
-rw-r--r--src/include/replication/output_plugin.h2
-rw-r--r--src/include/replication/pgoutput.h2
-rw-r--r--src/include/replication/slot.h2
-rw-r--r--src/include/replication/snapbuild.h2
-rw-r--r--src/include/replication/syncrep.h2
-rw-r--r--src/include/replication/walreceiver.h4
-rw-r--r--src/include/replication/walsender.h2
-rw-r--r--src/include/replication/walsender_private.h2
-rw-r--r--src/include/replication/worker_internal.h2
16 files changed, 18 insertions, 18 deletions
diff --git a/src/include/replication/basebackup.h b/src/include/replication/basebackup.h
index bbd446904fa..1a165c860b4 100644
--- a/src/include/replication/basebackup.h
+++ b/src/include/replication/basebackup.h
@@ -33,4 +33,4 @@ extern void SendBaseBackup(BaseBackupCmd *cmd);
extern int64 sendTablespace(char *path, bool sizeonly);
-#endif /* _BASEBACKUP_H */
+#endif /* _BASEBACKUP_H */
diff --git a/src/include/replication/logicallauncher.h b/src/include/replication/logicallauncher.h
index 4f3e89e0619..aac7d326e22 100644
--- a/src/include/replication/logicallauncher.h
+++ b/src/include/replication/logicallauncher.h
@@ -26,4 +26,4 @@ extern void AtEOXact_ApplyLauncher(bool isCommit);
extern bool IsLogicalLauncher(void);
-#endif /* LOGICALLAUNCHER_H */
+#endif /* LOGICALLAUNCHER_H */
diff --git a/src/include/replication/logicalproto.h b/src/include/replication/logicalproto.h
index e7679e29edf..191b03772fb 100644
--- a/src/include/replication/logicalproto.h
+++ b/src/include/replication/logicalproto.h
@@ -103,4 +103,4 @@ extern LogicalRepRelation *logicalrep_read_rel(StringInfo in);
extern void logicalrep_write_typ(StringInfo out, Oid typoid);
extern void logicalrep_read_typ(StringInfo out, LogicalRepTyp *ltyp);
-#endif /* LOGICALREP_PROTO_H */
+#endif /* LOGICALREP_PROTO_H */
diff --git a/src/include/replication/logicalrelation.h b/src/include/replication/logicalrelation.h
index 3b814d3b2b5..83527056502 100644
--- a/src/include/replication/logicalrelation.h
+++ b/src/include/replication/logicalrelation.h
@@ -16,7 +16,7 @@
typedef struct LogicalRepRelMapEntry
{
- LogicalRepRelation remoterel; /* key is remoterel.remoteid */
+ LogicalRepRelation remoterel; /* key is remoterel.remoteid */
/* Mapping to local relation, filled as needed. */
Oid localreloid; /* local relation id */
@@ -39,4 +39,4 @@ extern void logicalrep_rel_close(LogicalRepRelMapEntry *rel,
extern void logicalrep_typmap_update(LogicalRepTyp *remotetyp);
extern Oid logicalrep_typmap_getid(Oid remoteid);
-#endif /* LOGICALRELATION_H */
+#endif /* LOGICALRELATION_H */
diff --git a/src/include/replication/logicalworker.h b/src/include/replication/logicalworker.h
index 5877a930f68..2557d5a23bb 100644
--- a/src/include/replication/logicalworker.h
+++ b/src/include/replication/logicalworker.h
@@ -16,4 +16,4 @@ extern void ApplyWorkerMain(Datum main_arg);
extern bool IsLogicalWorker(void);
-#endif /* LOGICALWORKER_H */
+#endif /* LOGICALWORKER_H */
diff --git a/src/include/replication/message.h b/src/include/replication/message.h
index b016af7bd77..1f2d0bb5353 100644
--- a/src/include/replication/message.h
+++ b/src/include/replication/message.h
@@ -39,4 +39,4 @@ void logicalmsg_redo(XLogReaderState *record);
void logicalmsg_desc(StringInfo buf, XLogReaderState *record);
const char *logicalmsg_identify(uint8 info);
-#endif /* PG_LOGICAL_MESSAGE_H */
+#endif /* PG_LOGICAL_MESSAGE_H */
diff --git a/src/include/replication/origin.h b/src/include/replication/origin.h
index d6b8eb9d80c..ca56c01469f 100644
--- a/src/include/replication/origin.h
+++ b/src/include/replication/origin.h
@@ -71,4 +71,4 @@ const char *replorigin_identify(uint8 info);
extern Size ReplicationOriginShmemSize(void);
extern void ReplicationOriginShmemInit(void);
-#endif /* PG_ORIGIN_H */
+#endif /* PG_ORIGIN_H */
diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h
index 511216a295a..26ff024882e 100644
--- a/src/include/replication/output_plugin.h
+++ b/src/include/replication/output_plugin.h
@@ -108,4 +108,4 @@ extern void OutputPluginPrepareWrite(struct LogicalDecodingContext *ctx, bool la
extern void OutputPluginWrite(struct LogicalDecodingContext *ctx, bool last_write);
extern void OutputPluginUpdateProgress(struct LogicalDecodingContext *ctx);
-#endif /* OUTPUT_PLUGIN_H */
+#endif /* OUTPUT_PLUGIN_H */
diff --git a/src/include/replication/pgoutput.h b/src/include/replication/pgoutput.h
index 8cd29ab1641..bfe8448ba98 100644
--- a/src/include/replication/pgoutput.h
+++ b/src/include/replication/pgoutput.h
@@ -27,4 +27,4 @@ typedef struct PGOutputData
List *publications;
} PGOutputData;
-#endif /* PGOUTPUT_H */
+#endif /* PGOUTPUT_H */
diff --git a/src/include/replication/slot.h b/src/include/replication/slot.h
index 9a2dbd7b61c..a283f4e2b86 100644
--- a/src/include/replication/slot.h
+++ b/src/include/replication/slot.h
@@ -184,4 +184,4 @@ extern void CheckPointReplicationSlots(void);
extern void CheckSlotRequirements(void);
-#endif /* SLOT_H */
+#endif /* SLOT_H */
diff --git a/src/include/replication/snapbuild.h b/src/include/replication/snapbuild.h
index dc676a0ce2e..7653717f83f 100644
--- a/src/include/replication/snapbuild.h
+++ b/src/include/replication/snapbuild.h
@@ -87,4 +87,4 @@ extern void SnapBuildProcessRunningXacts(SnapBuild *builder, XLogRecPtr lsn,
struct xl_running_xacts *running);
extern void SnapBuildSerializationPoint(SnapBuild *builder, XLogRecPtr lsn);
-#endif /* SNAPBUILD_H */
+#endif /* SNAPBUILD_H */
diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h
index 1676ea09520..ceafe2cbea1 100644
--- a/src/include/replication/syncrep.h
+++ b/src/include/replication/syncrep.h
@@ -94,4 +94,4 @@ extern void syncrep_yyerror(const char *str);
extern void syncrep_scanner_init(const char *query_string);
extern void syncrep_scanner_finish(void);
-#endif /* _SYNCREP_H */
+#endif /* _SYNCREP_H */
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/walreceiver.h
index 68a813895b6..c8652dbd489 100644
--- a/src/include/replication/walreceiver.h
+++ b/src/include/replication/walreceiver.h
@@ -153,7 +153,7 @@ typedef struct
struct
{
uint32 proto_version; /* Logical protocol version */
- List *publication_names; /* String list of publications */
+ List *publication_names; /* String list of publications */
} logical;
} proto;
} WalRcvStreamOptions;
@@ -298,4 +298,4 @@ extern int GetReplicationApplyDelay(void);
extern int GetReplicationTransferLatency(void);
extern void WalRcvForceReply(void);
-#endif /* _WALRECEIVER_H */
+#endif /* _WALRECEIVER_H */
diff --git a/src/include/replication/walsender.h b/src/include/replication/walsender.h
index c50e450ec2a..1f20db827a8 100644
--- a/src/include/replication/walsender.h
+++ b/src/include/replication/walsender.h
@@ -72,4 +72,4 @@ extern void WalSndRqstFileReload(void);
} \
} while (0)
-#endif /* _WALSENDER_H */
+#endif /* _WALSENDER_H */
diff --git a/src/include/replication/walsender_private.h b/src/include/replication/walsender_private.h
index 36311e124c4..0aa80d5c3e2 100644
--- a/src/include/replication/walsender_private.h
+++ b/src/include/replication/walsender_private.h
@@ -114,4 +114,4 @@ extern void replication_scanner_finish(void);
extern Node *replication_parse_result;
-#endif /* _WALSENDER_PRIVATE_H */
+#endif /* _WALSENDER_PRIVATE_H */
diff --git a/src/include/replication/worker_internal.h b/src/include/replication/worker_internal.h
index 2bfff5c1205..494a3a3d087 100644
--- a/src/include/replication/worker_internal.h
+++ b/src/include/replication/worker_internal.h
@@ -90,4 +90,4 @@ am_tablesync_worker(void)
return OidIsValid(MyLogicalRepWorker->relid);
}
-#endif /* WORKER_INTERNAL_H */
+#endif /* WORKER_INTERNAL_H */