pgsql: Add logical change details to logical replication worker errcont

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема pgsql: Add logical change details to logical replication worker errcont
Дата
Msg-id E1mJSHZ-0007t9-52@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

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

Modified Files
--------------
src/backend/replication/logical/proto.c  |  53 +++++++
src/backend/replication/logical/worker.c | 259 +++++++++++++++++++++----------
src/include/replication/logicalproto.h   |   1 +
src/tools/pgindent/typedefs.list         |   2 +-
4 files changed, 235 insertions(+), 80 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: pgsql: contrib/amcheck: Add heapam CHECK_FOR_INTERRUPTS().
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: Avoid invoking PQfnumber in loop constructs