Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.
Date: 2017-08-28 14:16:31
Message-ID: 20170828141631.zabmccmic7nmrel4@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas wrote:
> On Mon, Aug 28, 2017 at 9:05 AM, Alvaro Herrera
> <alvherre(at)2ndquadrant(dot)com> wrote:
> > Robert Haas wrote:
> >> pg_rewind: Fix some problems when copying files >2GB.
> >
> > I just noticed that this broke pg_rewind translation, because of the
> > INT64_FORMAT marker in the translatable string. The message catalog now
> > has this:
> >
> > msgid "received chunk for file \"%s\", offset "
> >
> > for this source line:
> >
> > pg_log(PG_DEBUG, "received chunk for file \"%s\", offset " INT64_FORMAT ", size %d\n",
> > filename, chunkoff, chunksize);
> >
> > I don't think that this is terribly valuable as a translatable string,
> > so my preferred fix would be to have a new function pg_debug() here
> > where the messages are *not* marked for translations.
>
> I am fine with however you want to handle it, but it seems odd to me
> that we don't have a way of embedding INT64_FORMAT in a translatable
> string. Surely that's going to be a problem in some case, sometime,
> isn't it?

The way we do that elsewhere is to print out the value to a string
variable and then use %s in the translatable message.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-08-28 14:24:14 Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.
Previous Message Tom Lane 2017-08-28 14:15:05 pgsql: Fix over-aggressive sanity check in misc_sanity.sql.

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-08-28 14:24:14 Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.
Previous Message Robert Haas 2017-08-28 14:08:44 Re: [COMMITTERS] pgsql: pg_rewind: Fix some problems when copying files >2GB.