pgsql: Enhance libpqrcv APIs to support slot synchronization. - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Enhance libpqrcv APIs to support slot synchronization.
Date
Msg-id E1rWrWT-004jRT-3v@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Enhance libpqrcv APIs to support slot synchronization.

This patch provides support for regular (non-replication) connections in
libpqrcv_connect(). This can be used to execute SQL statements on the
primary server without starting a walsender.

A new API libpqrcv_get_dbname_from_conninfo() is also added to extract the
database name from the given connection-info.

Note that this patch doesn't change any existing functionality but later
patches implementing the slot synchronization will use this functionality
to connect to the primary server to fetch required slot information.

Author: Shveta Malik, Hou Zhijie, Ajin Cherian
Reviewed-by: Peter Smith, Bertrand Drouvot, Dilip Kumar, Masahiko Sawada, Nisha Moond, Kuroda Hayato, Amit Kapila
Discussion: https://postgr.es/m/514f6f2f-6833-4539-39f1-96cd1e011f23@enterprisedb.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/subscriptioncmds.c            |   8 +-
.../libpqwalreceiver/libpqwalreceiver.c            | 119 ++++++++++++++++-----
src/backend/replication/logical/tablesync.c        |   2 +-
src/backend/replication/logical/worker.c           |   2 +-
src/backend/replication/walreceiver.c              |   2 +-
src/include/replication/walreceiver.h              |  21 +++-
6 files changed, 114 insertions(+), 40 deletions(-)


pgsql-committers by date:

Previous
From: Amit Kapila
Date:
Subject: pgsql: Improve the comments in 004_subscription.pl.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix assertion if index is dropped during REFRESH CONCURRENTLY