From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Don't try to print data type names in slot_store_error_callback( |
Date: | 2021-07-02 20:05:33 |
Message-ID: | E1lzPPp-0005bk-A5@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
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_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0b5089e8c9795cd9611ef5dfee756c97e14cfe75
Modified Files
--------------
src/backend/replication/logical/relation.c | 104 +----------------------------
src/backend/replication/logical/worker.c | 32 ++-------
src/include/replication/logicalrelation.h | 3 -
3 files changed, 6 insertions(+), 133 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2021-07-02 22:01:00 | pgsql: docs: clarify new aggressive vacuum mode for multi-xacts |
Previous Message | Bruce Momjian | 2021-07-02 18:47:02 | pgsql: doc: PG 14 relnotes, mention CONCURRENTLY improvements |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-07-02 20:07:28 | Re: logical replication worker accesses catalogs in error context callback |
Previous Message | Fabien COELHO | 2021-07-02 19:53:29 | Re: psql - factor out echo code |