Re: logical replication of truncate command with trigger causes Assert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: logical replication of truncate command with trigger causes Assert
Дата
Msg-id 1357803.1623252212@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: logical replication of truncate command with trigger causes Assert  (Mark Dilger <mark.dilger@enterprisedb.com>)
Список pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
>> On Jun 9, 2021, at 7:52 AM, Tom Lane <tgl@sss.pgh.pa.us> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Mark Dilger
Дата:
Сообщение: Re: logical replication of truncate command with trigger causes Assert
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options