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

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: pgsql: pg_rewind: Fetch small files according to new size.
Дата
Msg-id D95829A7-630F-4CB8-AD32-C450210F606A@yesql.se
обсуждение исходный текст
Ответ на Re: pgsql: pg_rewind: Fetch small files according to new size.  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: pgsql: pg_rewind: Fetch small files according to new size.  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-committers
> On 5 Apr 2022, at 15:36, Daniel Gustafsson <daniel@yesql.se> wrote:
>
>> On 5 Apr 2022, at 15:02, Daniel Gustafsson <dgustafsson@postgresql.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
'unsignedint') [-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/




В списке pgsql-committers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: pgsql: JSON_TABLE
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Fix compilerwarning in logging size_t