Re: logicalrep_message_type throws an error

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: logicalrep_message_type throws an error
Дата
Msg-id CAA4eK1LNdr33SvNcjJhKChtr6sH4QGv-PzCeb5kExQM0KXgbbQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: logicalrep_message_type throws an error  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Wed, Jul 5, 2023 at 4:26 PM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>
> On 2023-Jul-05, Amit Kapila wrote:
>
> > I think after returning "???" from logicalrep_message_type(), the
> > above is possible when we get the error: "invalid logical replication
> > message type "X"" from apply_dispatch(), right? If so, then what about
> > the case when we forgot to handle some message in
> > logicalrep_message_type() but handled it in apply_dispatch()? Isn't it
> > better to return the 'action' from the function
> > logicalrep_message_type() for unknown type? That way the information
> > could be a bit better and we can easily catch the code bug as well.
>
> Are you suggesting that logicalrep_message_type should include the
> numerical value of 'action' in the ??? message? Something like this:
>
>  ERROR:  invalid logical replication message type "X"
>  CONTEXT:  processing remote data for replication origin "pg_16638" during message type "??? (123)" in transaction
796,finished at 0/16266F8 
>

Yes, something like that would be better.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Thom Brown
Дата:
Сообщение: Re: Allow specifying a dbname in pg_basebackup connection string
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_basebackup check vs Windows file path limits