mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Make lsn argument of walrcv_create_slot() optional
Some callers are not using it, so it's wasteful to have to specify it. Reviewed-by: Masahiko Sawada <masahiko.sawada@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/CA+fd4k4BcYrYucNfTnK-CQX3+jsG+PRPEhHAUSo-W4P0Lec57A@mail.gmail.com
This commit is contained in:
parent
c096a804d9
commit
c67a55da4e
@ -428,7 +428,6 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
|
||||
*/
|
||||
if (connect)
|
||||
{
|
||||
XLogRecPtr lsn;
|
||||
char *err;
|
||||
WalReceiverConn *wrconn;
|
||||
List *tables;
|
||||
@ -479,7 +478,7 @@ CreateSubscription(CreateSubscriptionStmt *stmt, bool isTopLevel)
|
||||
Assert(slotname);
|
||||
|
||||
walrcv_create_slot(wrconn, slotname, false,
|
||||
CRS_NOEXPORT_SNAPSHOT, &lsn);
|
||||
CRS_NOEXPORT_SNAPSHOT, NULL);
|
||||
ereport(NOTICE,
|
||||
(errmsg("created replication slot \"%s\" on publisher",
|
||||
slotname)));
|
||||
|
@ -844,8 +844,10 @@ libpqrcv_create_slot(WalReceiverConn *conn, const char *slotname,
|
||||
slotname, pchomp(PQerrorMessage(conn->streamConn)))));
|
||||
}
|
||||
|
||||
*lsn = DatumGetLSN(DirectFunctionCall1Coll(pg_lsn_in, InvalidOid,
|
||||
CStringGetDatum(PQgetvalue(res, 0, 1))));
|
||||
if (lsn)
|
||||
*lsn = DatumGetLSN(DirectFunctionCall1Coll(pg_lsn_in, InvalidOid,
|
||||
CStringGetDatum(PQgetvalue(res, 0, 1))));
|
||||
|
||||
if (!PQgetisnull(res, 0, 2))
|
||||
snapshot = pstrdup(PQgetvalue(res, 0, 2));
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user