summaryrefslogtreecommitdiff
path: root/src/include/access/xlog.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:18:54 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-06-21 15:19:25 -0400
commitc7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch)
treee85979fb1213a731b7b557f8a830df541f26b135 /src/include/access/xlog.h
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/access/xlog.h')
-rw-r--r--src/include/access/xlog.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h
index e00ab12d2ee..49afdfb3748 100644
--- a/src/include/access/xlog.h
+++ b/src/include/access/xlog.h
@@ -24,9 +24,9 @@
/* Sync methods */
#define SYNC_METHOD_FSYNC 0
#define SYNC_METHOD_FDATASYNC 1
-#define SYNC_METHOD_OPEN 2 /* for O_SYNC */
+#define SYNC_METHOD_OPEN 2 /* for O_SYNC */
#define SYNC_METHOD_FSYNC_WRITETHROUGH 3
-#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
+#define SYNC_METHOD_OPEN_DSYNC 4 /* for O_DSYNC */
extern int sync_method;
extern PGDLLIMPORT TimeLineID ThisTimeLineID; /* current TLI */
@@ -173,9 +173,8 @@ extern bool XLOG_DEBUG;
/* These directly affect the behavior of CreateCheckPoint and subsidiaries */
#define CHECKPOINT_IS_SHUTDOWN 0x0001 /* Checkpoint is for shutdown */
-#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint,
- * but issued at end of WAL
- * recovery */
+#define CHECKPOINT_END_OF_RECOVERY 0x0002 /* Like shutdown checkpoint, but
+ * issued at end of WAL recovery */
#define CHECKPOINT_IMMEDIATE 0x0004 /* Do it without delays */
#define CHECKPOINT_FORCE 0x0008 /* Force even if no activity */
#define CHECKPOINT_FLUSH_ALL 0x0010 /* Flush all pages, including those
@@ -202,18 +201,18 @@ typedef struct CheckpointStatsData
TimestampTz ckpt_sync_end_t; /* end of fsyncs */
TimestampTz ckpt_end_t; /* end of checkpoint */
- int ckpt_bufs_written; /* # of buffers written */
+ int ckpt_bufs_written; /* # of buffers written */
int ckpt_segs_added; /* # of new xlog segments created */
- int ckpt_segs_removed; /* # of xlog segments deleted */
- int ckpt_segs_recycled; /* # of xlog segments recycled */
+ int ckpt_segs_removed; /* # of xlog segments deleted */
+ int ckpt_segs_recycled; /* # of xlog segments recycled */
int ckpt_sync_rels; /* # of relations synced */
- uint64 ckpt_longest_sync; /* Longest sync for one relation */
- uint64 ckpt_agg_sync_time; /* The sum of all the individual sync
- * times, which is not necessarily the
- * same as the total elapsed time for
- * the entire sync phase. */
+ uint64 ckpt_longest_sync; /* Longest sync for one relation */
+ uint64 ckpt_agg_sync_time; /* The sum of all the individual sync
+ * times, which is not necessarily the
+ * same as the total elapsed time for the
+ * entire sync phase. */
} CheckpointStatsData;
extern CheckpointStatsData CheckpointStats;
@@ -324,4 +323,4 @@ extern SessionBackupState get_backup_status(void);
#define TABLESPACE_MAP "tablespace_map"
#define TABLESPACE_MAP_OLD "tablespace_map.old"
-#endif /* XLOG_H */
+#endif /* XLOG_H */