On 26.03.21 04:28, Amit Kapila wrote:
I think as you have noted that stream_abort or rollback_prepared will
be sent (the remaining changes in-between will be skipped) as we
decode them from WAL

Yes, but as outlined, too late. Multiple other transactions may get decoded until the decoder reaches the ROLLBACK PREPARED. Thus, effectively, the output plugin currently needs to deduce that a transaction got aborted concurrently from one out of half a dozen other callbacks that may trigger right after that transaction, because it will only get closed properly much later.

so it is not clear to me how it causes any delays
as opposed to where we don't detect concurrent abort say because after
that we didn't access catalog table.

You're assuming very little traffic, where the ROLLBACK ABORT follows the PREPARE immediately in WAL. On a busy system, chances for that to happen are rather low.

(I think the same is true for streaming and stream_abort being sent only at the time the decoder reaches the ROLLBACK record in WAL. However, I did not try. Unlike 2PC, where this actually bit me.)

Regards

Markus


Reply via email to