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

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix the display of UNKNOWN message type in apply worker.
Date: 2023-07-25 03:52:32
Message-ID: E1qO967-001DLe-Se@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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: https://postgr.es/m/CAExHW5suAEDW-mBZt_qu4RVxWZ1vL54-L+ci2zreYWebpzxYsA@mail.gmail.com

Branch
------
REL_16_STABLE

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

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2023-07-25 04:41:13 pgsql: Optimize WAL insertion lock acquisition and release with some at
Previous Message Andres Freund 2023-07-25 03:24:11 pgsql: Fix off-by-one in LimitAdditionalPins()