postgresql/src/include/replication
Tom Lane feff615573 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
2021-07-02 16:04:54 -04:00
..
basebackup.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
decode.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
logical.h Remove superfluous newlines in function prototypes. 2019-07-31 00:07:09 -07:00
logicalfuncs.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
logicallauncher.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
logicalproto.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
logicalrelation.h Don't try to print data type names in slot_store_error_callback(). 2021-07-02 16:04:54 -04:00
logicalworker.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
message.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
origin.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
output_plugin.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
pgoutput.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
reorderbuffer.h Fix ABI break introduced by commit 4daa140a2f. 2021-06-24 15:25:13 +05:30
slot.h Don't call palloc() while holding a spinlock, either. 2020-06-03 12:36:24 -04:00
snapbuild.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
syncrep.h Fix race conditions in synchronous standby management. 2020-04-18 14:02:44 -04:00
walreceiver.h Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
walsender.h Update copyright for 2019 2019-01-02 12:44:25 -05:00
walsender_private.h Fix race conditions in synchronous standby management. 2020-04-18 14:02:44 -04:00
worker_internal.h Rename the logical replication global "wrconn" 2021-05-12 19:13:54 -04:00