diff options
author | Amit Kapila <akapila@postgresql.org> | 2024-02-05 10:45:34 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2024-02-05 10:54:06 +0530 |
commit | dafbfed9efbe3d166f25df7e564bad716e9f8bfc (patch) | |
tree | eb1479b244be5bed8e3819cd6ddd16544ff6148f /src/backend/replication/logical/tablesync.c | |
parent | a17aa50d67bad4ee39a94988c679d2c2fed0e934 (diff) | |
download | postgresql-dafbfed9efbe3d166f25df7e564bad716e9f8bfc.tar.gz postgresql-dafbfed9efbe3d166f25df7e564bad716e9f8bfc.zip |
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
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
-rw-r--r-- | src/backend/replication/logical/tablesync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index 5acab3f3e23..ee066290881 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -1329,7 +1329,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos) * so that synchronous replication can distinguish them. */ LogRepWorkerWalRcvConn = - walrcv_connect(MySubscription->conninfo, true, + walrcv_connect(MySubscription->conninfo, true, true, must_use_password, slotname, &err); if (LogRepWorkerWalRcvConn == NULL) |