Re: splitting pg_resetwal output strings - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: splitting pg_resetwal output strings
Date
Msg-id 202602131910.utbebc6fld7p@alvherre.pgsql
Whole thread Raw
In response to Re: splitting pg_resetwal output strings  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
On 2026-Feb-13, Peter Eisentraut wrote:

> On 31.01.26 10:41, Álvaro Herrera wrote:
> > Here's a proposal.  The idea is to have a separate file (entries.h right
> > now but proposal for better names are welcome) which lists those
> > strings, together with the printf specifiers needed to actually print
> > them.  This way, we can measure the length of each exactly as they
> > translate before printing anything, and then line up everything to the
> > same output length.
> 
> I think this basically also applies to most --help output and some other
> things.  So maybe having a general way to print a list of things
> automatically aligned in two columns would be good.

Yeah, that was my thinking as well, but I wanted to start small in order
to ensure it works properly everywhere and then have a month long
emergency if everything breaks; also, reaching consensus on exactly how
to use it in --help and other places is going to require some longer
discussion.

So I propose we commit this for 19, with some obvious cosmetic cleanups,
then we make the technique more general (in src/common/ or something)
and use it in other tools for 20.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Optional skipping of unchanged relations during ANALYZE?
Next
From: Alexander Lakhin
Date:
Subject: Re: BUG: Former primary node might stuck when started as a standby