Mark Dilger <[email protected]> writes:
>> On Jun 9, 2021, at 7:52 AM, Tom Lane <[email protected]> wrote:
>> Somewhat unrelated, but ... am I reading the code correctly that
>> apply_handle_stream_start and related routines are using Asserts
>> to check that the remote sent stream-control messages in the correct
>> order? That seems many degrees short of acceptable.
> Even if you weren't reading that correctly, this bit:
> xid = pq_getmsgint(s, 4);
> Assert(TransactionIdIsValid(xid));
> simply asserts that the sending server didn't send an invalid subtransaction
> id.
Ugh, yeah. We should never be using Asserts to validate incoming
messages -- a test-and-elog is more appropriate.
regards, tom lane