1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Add logical change details to logical replication worker errcontext.

Previously, on the subscriber, we set the error context callback for the
tuple data conversion failures. This commit replaces the existing error
context callback with a comprehensive one so that it shows not only the
details of data conversion failures but also the details of logical change
being applied by the apply worker or table sync worker. The additional
information displayed will be the command, transaction id, and timestamp.

The error context is added to an error only when applying a change but not
while doing other work like receiving data etc.

This will help users in diagnosing the problems that occur during logical
replication. It also can be used for future work that allows skipping a
particular transaction on the subscriber.

Author: Masahiko Sawada
Reviewed-by: Hou Zhijie, Greg Nancarrow, Haiying Tang, Amit Kapila
Tested-by: Haiying Tang
Discussion: https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xJfUVihNZDA@mail.gmail.com
This commit is contained in:
Amit Kapila
2021-08-27 08:30:23 +05:30
parent 191dce109b
commit abc0910e2e
4 changed files with 235 additions and 80 deletions

View File

@ -113,6 +113,7 @@ Append
AppendPath
AppendRelInfo
AppendState
ApplyErrorCallbackArg
ApplyExecutionData
ApplySubXactData
Archive
@ -2423,7 +2424,6 @@ SlabBlock
SlabChunk
SlabContext
SlabSlot
SlotErrCallbackArg
SlotNumber
SlruCtl
SlruCtlData