Re: Making pg_rewind faster

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: John H <johnhyvr(at)gmail(dot)com>
Cc: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Justin Kwan <justinpkwan(at)outlook(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh ravichandran <admin(at)viggy28(dot)dev>, "hlinnaka(at)iki(dot)fi" <hlinnaka(at)iki(dot)fi>
Subject: Re: Making pg_rewind faster
Date: 2025-10-24 07:56:33
Message-ID: aPsxMUt8CYvCKINU@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 23, 2025 at 03:01:32PM -0700, John H wrote:
> On Thu, Oct 23, 2025 at 9:08 AM Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com> wrote:
>> ...
>> i guess this is what you want ,please let me know if it's otherwise,
>> ...
>
> That looks right to me.

Yes, that would be something among these lines, WAL segments being
treated as an exception when printing the file map to show that they
are not copied.

>> These checks show that before the corrupt segment's size on
>> rewound standby(target) was not the same as source but after
>> rewind it was the same as source,please let me know if i am
>> missing your point here.
>
> What did you have in mind for additional sanity checks?
> The existing test checks that when sizes are different the correct
> branch is taken. For something more in-depth that requires comparing
> data before and after the rewind with a "corrupted" segment that seems
> complicated since the segment would have to somehow be applied to
> writer but not replica prior to divergence.

I was just wondering about some queries on the new standby once we are
done with the rewind. But after sleeping on it, I'd be happy with
just the set of tests we have: the debug output checks, the size
checks pre and post-rewind, and no mtime.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Kim 2025-10-24 08:09:56 Re: Proposal for enabling auto-vectorization for checksum calculations
Previous Message Hayato Kuroda (Fujitsu) 2025-10-24 07:54:30 RE: issue with synchronized_standby_slots