Re: pg_controldata output alignment regression - Mailing list pgsql-hackers

From Joe Conway
Subject Re: pg_controldata output alignment regression
Date
Msg-id 55DCA522.7010606@joeconway.com
Whole thread Raw
In response to Re: pg_controldata output alignment regression  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_controldata output alignment regression  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/24/2015 07:41 PM, Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>> Do we care that as of 9.5 pg_controldata output is not 100%
>> aligned anymore? The culprit is: Current track_commit_timestamp
>> setting: off Its value is shifted 2 characters to the right with
>> respect to all the others. I think it ought to be fixed but
>> thought I'd get opinions first.
> 
> Seems to me we could s/Current //g, or s/ setting//g, or both, and
> get rid of the problem without adding more whitespace.

I'd agree, except I think not everyone might be happy with that. The
surrounding lines look like:

8<----------------
...
End-of-backup record required:        no
Current wal_level setting:            minimal
Current wal_log_hints setting:        off
Current max_connections setting:      100
Current max_worker_processes setting: 8
Current max_prepared_xacts setting:   0
Current max_locks_per_xact setting:   64
Current track_commit_timestamp setting: off
Maximum data alignment:               8
Database block size:                  8192
...
8<----------------

So while changing that line to this would work...

8<----------------
...
Current max_locks_per_xact setting:   64
track_commit_timestamp setting:       off
Maximum data alignment:               8
...
8<----------------

... it does become inconsistent with the ones above.

One possible solution is to abbreviate "Current" for all of them as
"Cur.":

8<----------------
...
End-of-backup record required:        no
Cur. wal_level setting:               minimal
Cur. wal_log_hints setting:           off
Cur. max_connections setting:         100
Cur. max_worker_processes setting:    8
Cur. max_prepared_xacts setting:      0
Cur. max_locks_per_xact setting:      64
Cur. track_commit_timestamp setting:  off
Maximum data alignment:               8
Database block size:                  8192
...
8<----------------

Of course that breaks backward compatibility if you believe it is
important here. Otherwise maybe:

8<----------------
...
End-of-backup record required:        no
Current wal_level setting:            minimal
Current wal_log_hints setting:        off
Current max_connections setting:      100
Current max_worker_processes setting: 8
Current max_prepared_xacts setting:   0
Current max_locks_per_xact setting:   64
Cur. track_commit_timestamp setting:  off
Maximum data alignment:               8
Database block size:                  8192
...
8<----------------


Joe

- -- 
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJV3KUiAAoJEDfy90M199hlPmAP+wSn1w+l4YhPlkuk0tZVN5Vl
LpmXD3uGi0WXrt21jQgCaXdj3QeLPzrK9Pu5QDyHODpGexZ7j1lJiTl0cXxQ8CuK
LwyPlNr5nzoRGru+g4aRElzGr1unSPI4K8m7nVH2KTw/mmByR+RCQu6CPGqnOZ1+
4EtW/9svO4hw+YxhjRRdyQwP7XVhI1Og4jryp6kOdzmYbO0K+uMZo8+xFvRg4Sr5
u7iyJe1xUgrsqQhvbRh+eguV0+d/ykDGgodEEPfEEcmvxxQEDvhQ9STM8eEEoK1v
sz1/ObFbJ3GrzVZB5Mse6+uFwQB6JqJBvCrnkuH43d9U2NKikR5vm8VJ48yxvwd7
VZLXodAQmudlt0nJdL7vRGoOBt/gztSkuWvl+4y206GRdWcvkNFKTKyvnpoZdW+7
KIaz0D2mWeC/Hr5j84pTLPcfF3ezz+HdUHDmuSt7HX+fH3CSzhGlcoCMZdgZIIKM
1a2RHN8r3sF0U/hyKFjpFetq28Pgnrhardn7Y4U4qveCfwRopF4grNYYrfqreQ0a
xxi0bXb81iWX5HvvnWh82/NmG9qH+YhLaHqovvR/5+iXKpcv1do+oSVz0uKwaSen
4gcE7JiWELrhp6+iftzt2U0X69Xd5KeluScjaxeOaQsAYW53pHvOLk5c56RrHVim
WZiPEkdGZffETA0SCaZL
=hV8z
-----END PGP SIGNATURE-----



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Planned release for PostgreSQL 9.5
Next
From: Tom Lane
Date:
Subject: Re: pg_controldata output alignment regression