pgsql: Fix the display of UNKNOWN message type in apply worker.

Started by Amit Kapilaalmost 3 years ago3 messagescomitters
Jump to latest
#1Amit Kapila
amit.kapila16@gmail.com

Fix the display of UNKNOWN message type in apply worker.

We include the message type while displaying an error context in the
apply worker. Now, while retrieving the message type string if the
message type is unknown we throw an error that will hide the original
error. So, instead, we need to simply return the string indicating an
unknown message type.

Reported-by: Ashutosh Bapat
Author: Euler Taveira, Amit Kapila
Reviewed-by: Ashutosh Bapat
Backpatch-through: 15
Discussion: /messages/by-id/CAExHW5suAEDW-mBZt_qu4RVxWZ1vL54-L+ci2zreYWebpzxYsA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d38ad8e31dee1a69f4f6d4b6bb4e007e3751a93c

Modified Files
--------------
src/backend/replication/logical/proto.c | 13 ++++++++++---
src/backend/replication/logical/worker.c | 2 +-
src/include/replication/logicalproto.h | 2 +-
3 files changed, 12 insertions(+), 5 deletions(-)

#2Michael Paquier
michael@paquier.xyz
In reply to: Amit Kapila (#1)
Re: pgsql: Fix the display of UNKNOWN message type in apply worker.

On Tue, Jul 25, 2023 at 03:52:32AM +0000, Amit Kapila wrote:

Fix the display of UNKNOWN message type in apply worker.

We include the message type while displaying an error context in the
apply worker. Now, while retrieving the message type string if the
message type is unknown we throw an error that will hide the original
error. So, instead, we need to simply return the string indicating an
unknown message type.

koel is complaining after this commit:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel&dt=2023-07-25%2004%3A49%3A03
--
Michael

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Michael Paquier (#2)
Re: pgsql: Fix the display of UNKNOWN message type in apply worker.

On Tue, Jul 25, 2023 at 10:51 AM Michael Paquier <michael@paquier.xyz> wrote:

On Tue, Jul 25, 2023 at 03:52:32AM +0000, Amit Kapila wrote:

Fix the display of UNKNOWN message type in apply worker.

We include the message type while displaying an error context in the
apply worker. Now, while retrieving the message type string if the
message type is unknown we throw an error that will hide the original
error. So, instead, we need to simply return the string indicating an
unknown message type.

koel is complaining after this commit:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel&amp;dt=2023-07-25%2004%3A49%3A03

Pushed a fix.

--
With Regards,
Amit Kapila.