Re: pgsql: pg_rewind: Fetch small files according to new size.

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: pg_rewind: Fetch small files according to new size.
Date: 2022-04-05 19:46:27
Message-ID: D95829A7-630F-4CB8-AD32-C450210F606A@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

> On 5 Apr 2022, at 15:36, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
>> On 5 Apr 2022, at 15:02, Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> wrote:
>>
>> pg_rewind: Fetch small files according to new size.
>
> The buildfarm is less impressed than CI was, I’m collecting more feedback and will then fix.

Sorry for being slow, life took over and children with fever took priority.
The error in question was:

local_source.c:118:15: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned int') [-Werror,-Wformat]
srcpath, len, written_len);
~~~~~~~~~^~~~~~~~~~~~~~~~~

I'm running a fixup with casting to int and printing with %d (like how
pg_rewind.c:digestControlFile already does it for printing a size_t) through CI
just to be sure and will push once it's had a green run:

- pg_fatal("size of source file \"%s\" changed concurrently: " UINT64_FORMAT " bytes expected, " UINT64_FORMAT " copied",
- srcpath, len, written_len);
+ pg_fatal("size of source file \"%s\" changed concurrently: %d bytes expected, %d copied",
+ srcpath, (int) len, (int) written_len);

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-04-05 20:24:59 pgsql: Fix compilerwarning in logging size_t
Previous Message Andrew Dunstan 2022-04-05 19:35:58 Re: pgsql: JSON_TABLE