From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't try to print data type names in slot_store_error_callback(
Date: Fri, 02 Jul 2021 20:05:33 +0000
Message-ID: <E1lzPPp-0005bf-9E@gemulon.postgresql.org> (raw)
Don't try to print data type names in slot_store_error_callback().
The existing code tried to do syscache lookups in an already-failed
transaction, which is problematic to say the least. After some
consideration of alternatives, the best fix seems to be to just drop
type names from the error message altogether. The table and column
names seem like sufficient localization. If the user is unsure what
types are involved, she can check the local and remote table
definitions.
Having done that, we can also discard the LogicalRepTypMap hash
table, which had no other use. Arguably, LOGICAL_REP_MSG_TYPE
replication messages are now obsolete as well; but we should
probably keep them in case some other use emerges. (The complexity
of removing something from the replication protocol would likely
outweigh any savings anyhow.)
Masahiko Sawada and Bharath Rupireddy, per complaint from Andres
Freund. Back-patch to v10 where this code originated.
Discussion: https://postgr.es/m/20210106020229.ne5xnuu6wlondjpe@alap3.anarazel.de
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/feff6155734e75d9471bb84319afb6f9ca114686
Modified Files
--------------
src/backend/replication/logical/relation.c | 106 +----------------------------
src/backend/replication/logical/worker.c | 32 ++-------
src/include/replication/logicalrelation.h | 3 -
3 files changed, 6 insertions(+), 135 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Don't try to print data type names in slot_store_error_callback(
In-Reply-To: <E1lzPPp-0005bf-9E@gemulon.postgresql.org>
References: <E1lzPPp-0005bf-9E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox