| From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
|---|---|
| To: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
| Subject: | Re: Stabilize and shorten test_checksums/013_rewind test |
| Date: | 2026-09-21 11:04:59 |
| Message-ID: | 818CD068-BEE5-4573-A01B-0CE1E6A1EEB6@yesql.se |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On 18 Sep 2026, at 15:47, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> On Fri, 18 Sept 2026 at 15:51, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> In these cases, couldn't we just wait for the replay LSN, ie the default for
>> wait_for_catchup?
>
> Sorry, I am a bit confused. AFAIU, you meant:
>
> $node_a->wait_for_catchup($node_b);
>
> which is
>
> $node_a->wait_for_catchup($node_b, 'replay', $node_a->lsn('write'));
>
> If that is the case, could we still need to wait for an additional
> primary-side flush, since written WAL might not have been flushed yet?
> I understand that this might not cause the same long delay as waiting
> for the insert LSN. On my local, ->lsn('write') and ->lsn('flush') are
> basically same, they both take ~3 seconds.
I don't see how the test could do that given the sequence of commands in the
TAP file. At the end of the day, it's not super important though.
> My idea was that since the WAL needed by the tests has already been
> flushed, I thought that would be enough for the tests. Also, is using
> ->lsn('write') considered better for these cases or do you recommend
> it because of the simplicity?
I prefer when tests have the least amount of special needs setup outside of the
code under test. This isn't really making assumptions which make the test
synthetic though.
Another option for going with your patch is to use wait_for_replay_catchup
which should accomplish the same.
--
Daniel Gustafsson
| From | Date | Subject | |
|---|---|---|---|
| Next Message | John Naylor | 2026-09-21 11:11:41 | Re: Support for 8-byte TOAST values, round two |
| Previous Message | Shlok Kyal | 2026-09-21 10:46:18 | Re: table-write trigger can bypass ATPrepChangePersistence |