logicalrep_message_type throws an error
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
From: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-07-03T10:30:29Z
Lists: pgsql-hackers
Hi All, logicalrep_message_type() is used to convert logical message type code into name while prepared error context or details. Thus when this function is called probably an ERROR is already raised. If logicalrep_message_type() gets an unknown message type, it will throw an error, which will suppress the error for which we are building context or details. That's not useful. I think instead logicalrep_message_type() should return "unknown" when it encounters an unknown message type and let the original error message be thrown as is. -- Best Wishes, Ashutosh Bapat
Commits
-
Fix the display of UNKNOWN message type in apply worker.
- d38ad8e31dee 17.0 landed
- ad486b0eaef4 16.0 landed
- 2864eb977a6e 15.4 landed