diff options
| author | Tom Lane | 2017-06-21 19:18:54 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-06-21 19:19:25 +0000 |
| commit | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (patch) | |
| tree | e85979fb1213a731b7b557f8a830df541f26b135 /src/include/postmaster | |
| parent | f669c09989bda894d6ba01634ccb229f0687c08a (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/postmaster')
| -rw-r--r-- | src/include/postmaster/autovacuum.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/bgworker.h | 4 | ||||
| -rw-r--r-- | src/include/postmaster/bgworker_internals.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/bgwriter.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/fork_process.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/pgarch.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/postmaster.h | 8 | ||||
| -rw-r--r-- | src/include/postmaster/startup.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/syslogger.h | 2 | ||||
| -rw-r--r-- | src/include/postmaster/walwriter.h | 2 |
10 files changed, 14 insertions, 14 deletions
diff --git a/src/include/postmaster/autovacuum.h b/src/include/postmaster/autovacuum.h index d383fd3926e..3469915ae25 100644 --- a/src/include/postmaster/autovacuum.h +++ b/src/include/postmaster/autovacuum.h @@ -78,4 +78,4 @@ extern void AutoVacuumRequestWork(AutoVacuumWorkItemType type, extern Size AutoVacuumShmemSize(void); extern void AutoVacuumShmemInit(void); -#endif /* AUTOVACUUM_H */ +#endif /* AUTOVACUUM_H */ diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h index be4d3d27dab..e2ecd3c9eb2 100644 --- a/src/include/postmaster/bgworker.h +++ b/src/include/postmaster/bgworker.h @@ -90,7 +90,7 @@ typedef struct BackgroundWorker char bgw_name[BGW_MAXLEN]; int bgw_flags; BgWorkerStartTime bgw_start_time; - int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ + int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ char bgw_library_name[BGW_MAXLEN]; char bgw_function_name[BGW_MAXLEN]; Datum bgw_main_arg; @@ -147,4 +147,4 @@ extern void BackgroundWorkerInitializeConnectionByOid(Oid dboid, Oid useroid); extern void BackgroundWorkerBlockSignals(void); extern void BackgroundWorkerUnblockSignals(void); -#endif /* BGWORKER_H */ +#endif /* BGWORKER_H */ diff --git a/src/include/postmaster/bgworker_internals.h b/src/include/postmaster/bgworker_internals.h index 9e0b0621cf4..bff10ba53c8 100644 --- a/src/include/postmaster/bgworker_internals.h +++ b/src/include/postmaster/bgworker_internals.h @@ -60,4 +60,4 @@ extern void StartBackgroundWorker(void) pg_attribute_noreturn(); extern BackgroundWorker *BackgroundWorkerEntry(int slotno); #endif -#endif /* BGWORKER_INTERNALS_H */ +#endif /* BGWORKER_INTERNALS_H */ diff --git a/src/include/postmaster/bgwriter.h b/src/include/postmaster/bgwriter.h index 359b3ef5a5d..a9b8bc7e8e9 100644 --- a/src/include/postmaster/bgwriter.h +++ b/src/include/postmaster/bgwriter.h @@ -40,4 +40,4 @@ extern void CheckpointerShmemInit(void); extern bool FirstCallSinceLastCheckpoint(void); -#endif /* _BGWRITER_H */ +#endif /* _BGWRITER_H */ diff --git a/src/include/postmaster/fork_process.h b/src/include/postmaster/fork_process.h index c2bfd44ea0a..9d5b97aca75 100644 --- a/src/include/postmaster/fork_process.h +++ b/src/include/postmaster/fork_process.h @@ -14,4 +14,4 @@ extern pid_t fork_process(void); -#endif /* FORK_PROCESS_H */ +#endif /* FORK_PROCESS_H */ diff --git a/src/include/postmaster/pgarch.h b/src/include/postmaster/pgarch.h index 6a4e0f43b84..ab1ddcf52c7 100644 --- a/src/include/postmaster/pgarch.h +++ b/src/include/postmaster/pgarch.h @@ -36,4 +36,4 @@ extern int pgarch_start(void); extern void PgArchiverMain(int argc, char *argv[]) pg_attribute_noreturn(); #endif -#endif /* _PGARCH_H */ +#endif /* _PGARCH_H */ diff --git a/src/include/postmaster/postmaster.h b/src/include/postmaster/postmaster.h index 95231bf768b..0f85908b098 100644 --- a/src/include/postmaster/postmaster.h +++ b/src/include/postmaster/postmaster.h @@ -39,9 +39,9 @@ extern int postmaster_alive_fds[2]; * Constants that represent which of postmaster_alive_fds is held by * postmaster, and which is used in children to check for postmaster death. */ -#define POSTMASTER_FD_WATCH 0 /* used in children to check for - * postmaster death */ -#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ +#define POSTMASTER_FD_WATCH 0 /* used in children to check for + * postmaster death */ +#define POSTMASTER_FD_OWN 1 /* kept open by postmaster only */ #endif extern const char *progname; @@ -74,4 +74,4 @@ extern void ShmemBackendArrayAllocation(void); */ #define MAX_BACKENDS 0x3FFFF -#endif /* _POSTMASTER_H */ +#endif /* _POSTMASTER_H */ diff --git a/src/include/postmaster/startup.h b/src/include/postmaster/startup.h index ce76d949917..883bd395bd6 100644 --- a/src/include/postmaster/startup.h +++ b/src/include/postmaster/startup.h @@ -19,4 +19,4 @@ extern void PostRestoreCommand(void); extern bool IsPromoteTriggered(void); extern void ResetPromoteTriggered(void); -#endif /* _STARTUP_H */ +#endif /* _STARTUP_H */ diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index 94d7eac347f..f4248ef5d46 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -94,4 +94,4 @@ extern void SysLoggerMain(int argc, char *argv[]) pg_attribute_noreturn(); #define LOG_METAINFO_DATAFILE "current_logfiles" #define LOG_METAINFO_DATAFILE_TMP LOG_METAINFO_DATAFILE ".tmp" -#endif /* _SYSLOGGER_H */ +#endif /* _SYSLOGGER_H */ diff --git a/src/include/postmaster/walwriter.h b/src/include/postmaster/walwriter.h index fb91385e0ba..f0eb4258021 100644 --- a/src/include/postmaster/walwriter.h +++ b/src/include/postmaster/walwriter.h @@ -18,4 +18,4 @@ extern int WalWriterFlushAfter; extern void WalWriterMain(void) pg_attribute_noreturn(); -#endif /* _WALWRITER_H */ +#endif /* _WALWRITER_H */ |
