Re: [BUG] Take a long time to reach consistent after pg_rewind - Mailing list pgsql-hackers

From cca5507
Subject Re: [BUG] Take a long time to reach consistent after pg_rewind
Date
Msg-id tencent_DFAEC2CEDADF1400992FBCB9836ABB97D007@qq.com
Whole thread Raw
In response to [BUG] Take a long time to reach consistent after pg_rewind  ("cca5507" <cca5507@qq.com>)
List pgsql-hackers
> Possible fix:
>
> The pg_rewind use pg_current_wal_insert_lsn() to set the min recovery point, which calls
> GetXLogInsertRecPtr() and returns the latest wal insert pointer. Maybe we should use
> GetXLogInsertEndRecPtr() which returns the latest wal record end pointer.
>
> Thoughts?

Another solution:

If minRecoveryPoint is just after a xlog page header, we can move it to the begin of
the page. It's safe because we just skip the xlog page header. Do I miss something?

Attach a patch done like this.

--
Regards,
ChangAo Chen

Attachment

pgsql-hackers by date:

Previous
From: André Verwijs
Date:
Subject: postgresql19-server-19-alpha sles 15.7 still needs older Leap 15.6 Packages ..
Next
From: Peter Eisentraut
Date:
Subject: PGConf.dev 2026 In-Person Commitfest ready for patch submissions