On 21/01/2020 13:33, Craig Ringer wrote:
On Tue, 21 Jan 2020 at 18:46, Kyotaro Horiguchi <horikyota....@gmail.com> wrote:
It seems to me that it works perfectly, and everything looks good

I seem to remember some considerable pain in this area when it came to
timeline switches. Especially with logical decoding and xlog records
that split across a segment boundary.

My first attempts at logical decoding timeline following appeared fine
and passed tests until they were put under extended real world
workloads, at which point they exploded when they tripped corner cases
like this.

I landed up writing ridiculous regression tests to trigger some of
these behaviours. I don't recall how many of them made it into the
final patch to core but it's worth a look in the TAP test suite.

Yeah, the timeline switching stuff is complicated. The small XLogBeginRead() patch isn't really affected, but it's definitely something to watch out for in the callback API patch. If you happen to have any extra ridiculous tests still lying around, would be nice to look at them.

- Heikki


Reply via email to