Reestablish alignment of pg_controldata output.
authorJoe Conway <[email protected]>
Wed, 26 Aug 2015 01:45:44 +0000 (18:45 -0700)
committerJoe Conway <[email protected]>
Wed, 26 Aug 2015 01:45:44 +0000 (18:45 -0700)
Until 9.4, pg_controldata output was all aligned. At some point
during 9.5 development, a new item was added, namely
"Current track_commit_timestamp setting:" which is two characters
too long to be aligned with the rest of the output. Fix this by
removing the noise word "Current" and adding the requisite number
of padding spaces. Since the six preceding items are also similar
in nature, remove "Current" and pad those as well in order to
maintain overall consistency. Backpatch to 9.5 where new offending
item was added.

src/bin/pg_controldata/pg_controldata.c

index d8cfe5e68dc0ddeefd580138678573a97f084ed2..046480cc28e90ce842cea17613380dc6d56c4a2a 100644 (file)
@@ -290,19 +290,19 @@ main(int argc, char *argv[])
                   (uint32) ControlFile.backupEndPoint);
        printf(_("End-of-backup record required:        %s\n"),
                   ControlFile.backupEndRequired ? _("yes") : _("no"));
-       printf(_("Current wal_level setting:            %s\n"),
+       printf(_("wal_level setting:                    %s\n"),
                   wal_level_str(ControlFile.wal_level));
-       printf(_("Current wal_log_hints setting:        %s\n"),
+       printf(_("wal_log_hints setting:                %s\n"),
                   ControlFile.wal_log_hints ? _("on") : _("off"));
-       printf(_("Current max_connections setting:      %d\n"),
+       printf(_("max_connections setting:              %d\n"),
                   ControlFile.MaxConnections);
-       printf(_("Current max_worker_processes setting: %d\n"),
+       printf(_("max_worker_processes setting:         %d\n"),
                   ControlFile.max_worker_processes);
-       printf(_("Current max_prepared_xacts setting:   %d\n"),
+       printf(_("max_prepared_xacts setting:           %d\n"),
                   ControlFile.max_prepared_xacts);
-       printf(_("Current max_locks_per_xact setting:   %d\n"),
+       printf(_("max_locks_per_xact setting:           %d\n"),
                   ControlFile.max_locks_per_xact);
-       printf(_("Current track_commit_timestamp setting: %s\n"),
+       printf(_("track_commit_timestamp setting:       %s\n"),
                   ControlFile.track_commit_timestamp ? _("on") : _("off"));
        printf(_("Maximum data alignment:               %u\n"),
                   ControlFile.maxAlign);