Re: Why is subscription/t/031_column_list.pl failing so much?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>, Noah Misch <noah@leadboat.com>,
pgsql-hackers@lists.postgresql.org
Date: 2024-02-06T20:36:29Z
Lists: pgsql-hackers
Attachments
- hack-add-delay-in-walsender-loop.patch (text/x-diff) patch
I wrote: > More to the point, aren't these proposals just band-aids that > would stabilize the test without fixing the actual problem? > The same thing is likely to happen to people in the field, > unless we do something drastic like removing ALTER SUBSCRIPTION. I've been able to make the 031_column_list.pl failure pretty reproducible by adding a delay in walsender, as attached. While I'm not too familiar with this code, it definitely does appear that the new walsender is told to start up at an LSN before the creation of the publication, and then if it needs to decide whether to stream a particular data change before it's reached that creation, kaboom! I read and understood the upthread worries about it not being a great idea to ignore publication lookup failures, but I really don't see that we have much choice. As an example, if a subscriber is humming along reading publication pub1, and then someone drops and then recreates pub1 on the publisher, I don't think that the subscriber will be able to advance through that gap if there are any operations within it that require deciding if they should be streamed. (That is, contrary to Amit's expectation that DROP/CREATE would mask the problem, I suspect it will instead turn it into a hard failure. I've not experimented though.) BTW, this same change breaks two other subscription tests: 015_stream.pl and 022_twophase_cascade.pl. The symptoms are different (no "publication does not exist" errors), so maybe these are just test problems not fundamental weaknesses. But "replication falls over if the walsender is slow" isn't something I'd call acceptable. regards, tom lane
Commits
-
Back-patch test modifications that were done as part of b6df0798a5.
- 22cecaddf7c8 16.3 landed
- b5abeb751419 15.7 landed
-
Fix the intermittent buildfarm failures in 031_column_list.
- b6df0798a5e2 17.0 landed
-
Fix test race between primary XLOG_RUNNING_XACTS and standby logical slot.
- c59a97313ba3 16.3 landed
- 0e162810df76 17.0 landed
-
Bound waits in 035_standby_logical_decoding.pl.
- f024746484b9 16.3 landed
- 4791f87f34bd 17.0 landed