Re: Making pg_rewind faster - Mailing list pgsql-hackers

From Japin Li
Subject Re: Making pg_rewind faster
Date
Msg-id SY8P300MB0442D882D98D638C40298D59B642A@SY8P300MB0442.AUSP300.PROD.OUTLOOK.COM
Whole thread Raw
In response to Making pg_rewind faster  (vignesh ravichandran <admin@viggy28.dev>)
Responses Re: Making pg_rewind faster
List pgsql-hackers
On Thu, 03 Jul 2025 at 12:59, John H <johnhyvr@gmail.com> wrote:
> Hi,
>
> On Wed, Jul 2, 2025 at 6:40 PM Japin Li <japinli@hotmail.com> wrote:
>>
>> >
>>
>> Splitting the logs from $PGDATA is definitely better. The question is whether
>> it's worth implementing this directly in core or if a prominent note in the
>> documentation would suffice.
>>
>
> I can work on the documentation update as a separate patch if folks
> think this is worthwhile.
>
>> >> On Wed, Jul 2, 2025 at 10:21 AM Japin Li <japinli@hotmail.com> wrote:
>>
>> Exactly!  It's confusing that getFileType() returns file_content_type_t
>> instead of file_type_t.
>>
>
> Ah yes that is confusing, updated in patch.
>
>> For v5 patch:
>>
>> 1.
>> We could simply use the global WalSegSz variable within decide_file_action(),
>> eliminating the need to pass wal_segsz_bytes as an argument.
>>
>
> Good point.
>
>> 2.
>> For last_common_segno, we could implement it similarly to WalSegSz, avoiding a
>> signature change for decide_file_actions() and decide_file_action().  I'm not
>> insisting on this approach, however.
>>
>
> I made it a global as well, and had to include access/xlog_internal.h
> in pg_rewind.h but I don't feel strongly about it either way.
>

Thanks, LGTM.

--
Regards,
Japin Li



pgsql-hackers by date:

Previous
From: Rahila Syed
Date:
Subject: Re: Improve error message for duplicate labels in enum types
Next
From: Daniil Davydov
Date:
Subject: Re: Speedup truncations of temporary relation forks