Re: Isn't wait_for_catchup slightly broken?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Cc: Julien Rouhaud <rjuju123@gmail.com>
Date: 2022-01-15T22:58:02Z
Lists: pgsql-hackers
Attachments
- clean-up-wait_for_catchup-usage.patch (text/x-diff) patch
I wrote:
> Another thing that is bothering me a bit is that a number of the
> callers use $node->lsn('insert') as the target. This also seems
> rather dubious, because that could be ahead of what's been written
> out. These callers are just taking it on faith that something will
> eventually cause that extra WAL to get written out (and become
> available to the standby). Again, that seems to make the test
> slower than it need be, with a worst-case scenario being that it
> eventually times out. Admittedly this is unlikely to be a big
> problem unless some background op issues an abortive transaction
> at just the wrong time. Nonetheless, I wonder if we shouldn't
> standardize on "thou shalt use the write position", because I
> don't think the other alternatives have anything to recommend them.
Here's a version that makes sure that callers specify a write position not
an insert position. I also simplified the callers wherever it turned
out that they could just use the default parameters.
regards, tom lane
Commits
-
Clean up TAP tests' usage of wait_for_catchup().
- ed48e3582e84 15.0 landed