pgsql: Allow enabling two-phase option via replication protocol.

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема pgsql: Allow enabling two-phase option via replication protocol.
Дата
Msg-id E1lyQs7-0004cs-Bo@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Allow enabling two-phase option via replication protocol.

Extend the replication command CREATE_REPLICATION_SLOT to support the
TWO_PHASE option. This will allow decoding commands like PREPARE
TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED for slots created with
this option. The decoding of the transaction happens at prepare command.

This patch also adds support of two-phase in pg_recvlogical via a new
option --two-phase.

This option will also be used by future patches that allow streaming of
transactions at prepare time for built-in logical replication. With this,
the out-of-core logical replication solutions can enable replication of
two-phase transactions via replication protocol.

Author: Ajin Cherian
Reviewed-By: Jeff Davis, Vignesh C, Amit Kapila
Discussion:
https://postgr.es/m/02DA5F5E-CECE-4D9C-8B4B-418077E2C010@postgrespro.ru
https://postgr.es/m/64b9f783c6e125f18f88fbc0c0234e34e71d8639.camel@j-davis.com

Branch
------
master

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

Modified Files
--------------
doc/src/sgml/logicaldecoding.sgml             | 23 ++++++++++++--
doc/src/sgml/protocol.sgml                    | 16 +++++++++-
doc/src/sgml/ref/pg_recvlogical.sgml          | 16 ++++++++++
src/backend/replication/repl_gram.y           |  6 ++++
src/backend/replication/repl_scanner.l        |  1 +
src/backend/replication/walsender.c           | 18 +++++++++--
src/bin/pg_basebackup/pg_basebackup.c         |  2 +-
src/bin/pg_basebackup/pg_receivewal.c         |  2 +-
src/bin/pg_basebackup/pg_recvlogical.c        | 19 +++++++++--
src/bin/pg_basebackup/streamutil.c            |  6 +++-
src/bin/pg_basebackup/streamutil.h            |  2 +-
src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 45 ++++++++++++++++++++++++++-
12 files changed, 143 insertions(+), 13 deletions(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix incorrect PITR message for transaction ROLLBACK PREPARED
Следующее
От: Amit Kapila
Дата:
Сообщение: pgsql: Allow streaming the changes after speculative aborts.