Re: Can we change pg_rewind used without wal_log_hints and data_checksums

From: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
To: Movead <lchch1990(at)sina(dot)cn>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums
Date: 2026-01-19 06:35:00
Message-ID: CAGjGUA+3sjA5Tcq0ksb_en+S9-rp7UdDvVd07_ZyiMSjP1W86A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Movead and Heikki
I have reviewed this patch and find the approach reasonable.Given that
you are one of the contributors to this tool, I would be grateful if you
could review it and provide your feedback.Thank you very much.

Thanks

On Fri, Jan 16, 2026 at 11:07 PM Movead <lchch1990(at)sina(dot)cn> wrote:

>
> >It's an interesting idea.
> >While it’s impossible to predict exactly how much WAL we’ll need to
> backtrack through --
> >I assume it mainly depends on the duration of long-running transactions
> -- this approach
> >seems to offer an opportunity using pg_rewind without enabling
> wal_log_hints.
>
> Hi Neil, thanks and I think it's meaningful.
>
>
> >Given the potential large gap between transaction IDs (especially when
> long-running transactions are involved),
> >maintaining a list/bitmap struct would be worthwhile.
>
> Yes I intend todo that but bitmapset can not use in src/bin and it seem no
> necessary to implement
> one. And attention that min and max is what commited after diverge record,
> so it nomally small gap.
> So it's the reason I give up.
>
>
> >A minor suggestion, for an operation that may fail, I suggest retrieving
> the first XLOG_RUNNING_XACTS record to obtain its base_xid
> >before doing the deep-dig process. If the task cannot be completed (i.e.,
> the base_xid <= min_commited_xid condition isn’t met),
> >we can throw an error immediately instead of waiting for all WAL records
> to be parsed.
>
> Mainly we can not get the first wal segment, because if no enough wal it
> will fetch wal segment
> by restore_command. Your suggestion is meanful only if no restore_command.
> Anyway let's see
> hacker's opnions.
>
> ----
> Best Regards,
> Movead Li
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-01-19 06:43:53 Re: Cleaning up PREPARE query strings?
Previous Message jian he 2026-01-19 06:18:22 Re: [PATCH] Add pg_get_role_ddl() functions for role recreation