Re: logicalrep_message_type throws an error
От | Euler Taveira |
---|---|
Тема | Re: logicalrep_message_type throws an error |
Дата | |
Msg-id | 6304a4d0-f16f-4e7c-a73e-81c8040fdb86@app.fastmail.com обсуждение исходный текст |
Ответ на | logicalrep_message_type throws an error (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>) |
Ответы |
Re: logicalrep_message_type throws an error
Re: logicalrep_message_type throws an error |
Список | pgsql-hackers |
On Mon, Jul 3, 2023, at 7:30 AM, Ashutosh Bapat wrote:
logicalrep_message_type() is used to convert logical message type codeinto name while prepared error context or details. Thus when thisfunction is called probably an ERROR is already raised. Iflogicalrep_message_type() gets an unknown message type, it will throwan error, which will suppress the error for which we are buildingcontext or details. That's not useful. I think insteadlogicalrep_message_type() should return "unknown" when it encountersan unknown message type and let the original error message be thrownas is.
Hmm. Good catch. The current behavior is:
ERROR: invalid logical replication message type "X"
LOG: background worker "logical replication worker" (PID 71800) exited with exit code 1
... that hides the details. After providing a default message type:
ERROR: invalid logical replication message type "X"
CONTEXT: processing remote data for replication origin "pg_16638" during message type "???" in transaction 796, finished at 0/16266F8
Masahiko, since abc0910e2e0 is your patch maybe you want to take a look at it.
Вложения
В списке pgsql-hackers по дате отправления: