Re: splitting pg_resetwal output strings

From: "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: splitting pg_resetwal output strings
Date: 2026-05-23 15:31:57
Message-ID: b5951fd8a69d00464e517886d6dc0b65b12bcdb6.camel@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I've tested the patch, and I found that in the first patch, the nsl.mk
file is changed to match the first argument of CONTROLDATA_LINE as the
string to match:

+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) \
+ CONTROLDATA_LINE:1

but in the second patch the CONTROLDATA_LINE moves the strings to the
second argument:

-CONTROLDATA_LINE("pg_control version number",
+CONTROLDATA_LINE(CD_CONTROL_VERSION, "pg_control version number",
"%u", ControlFile.pg_control_version)

While keeping the argument as it is, I suggest to switch to
CONTROLDATA_LINE:2 like this:

+GETTEXT_TRIGGERS = $(FRONTEND_COMMON_GETTEXT_TRIGGERS) \
+ CONTROLDATA_LINE:2

This will make `make update-po` take the strings from entries.h, which
is what I was expecting.

During testing, I found a couple of things that may be interesting, or
at least worth keeping in mind for the future implementation already
mentioned [1].

Even if the spacing calculation is correct, I found that the font size
is not the same for different languages, so if a strings or part of it,
is translated into, for example, Hindi, and most of it it's in English,
it will affect how it look in the terminal, meaning that it's probably
that a the second column will be moved to the left generating a
misalignment in the printed data

Regards!

[1]
https://www.postgresql.org/message-id/202509300530.jnwbfyrdxaah%40alvherre.pgsql
[2] https://sw.kovidgoyal.net/kitty/

--
Jonathan Gonzalez V.
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2026-05-23 15:40:08 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Amit Kapila 2026-05-23 15:29:35 Re: Adding REPACK [concurrently]