Re: [PATCH] Verify Checksums during Basebackups

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Banck <michael(dot)banck(at)credativ(dot)de>, Stephen Frost <sfrost(at)snowman(dot)net>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [PATCH] Verify Checksums during Basebackups
Date: 2018-04-03 14:42:26
Message-ID: CABUevEzTxq+Cm8YNZVkzm+25cs6v9U60ad8r=T6vkFzzQym76Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 3, 2018 at 4:32 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> I wrote:
> > Magnus Hagander <magnus(at)hagander(dot)net> writes:
> >> Unless.. %ld is the wrong thing to print:
> >> static int64 total_checksum_failures;
> >> We should perhaps be using something other than %ld to print that?
>
> > INT64_FORMAT.
>
> BTW, don't just stick INT64_FORMAT into the message-to-be-translated,
> or you'll break things for translation. Good practice is to sprintf
> into a local char array with INT64_FORMAT, then include the number
> into the displayed message with %s. You can find examples easily
> by grepping for INT64_FORMAT.
>

Thanks for the hint. I've pushed a fix along this line, let's see if clears
things.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-04-03 14:55:05 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Bruce Momjian 2018-04-03 14:40:07 Re: jsonb nesting level edge case