mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Return ReplicationSlotAcquire API to its original form
Per 96540f80f833; the awkward API introduced by c655077639
is no
longer needed.
Author: Andres Freund <andres@anarazel.de>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/20210408020913.zzprrlvqyvlt5cyy@alap3.anarazel.de
This commit is contained in:
@@ -601,7 +601,7 @@ StartReplication(StartReplicationCmd *cmd)
|
||||
|
||||
if (cmd->slotname)
|
||||
{
|
||||
(void) ReplicationSlotAcquire(cmd->slotname, SAB_Error);
|
||||
ReplicationSlotAcquire(cmd->slotname, true);
|
||||
if (SlotIsLogical(MyReplicationSlot))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
@@ -1137,7 +1137,7 @@ StartLogicalReplication(StartReplicationCmd *cmd)
|
||||
|
||||
Assert(!MyReplicationSlot);
|
||||
|
||||
(void) ReplicationSlotAcquire(cmd->slotname, SAB_Error);
|
||||
ReplicationSlotAcquire(cmd->slotname, true);
|
||||
|
||||
if (XLogRecPtrIsInvalid(MyReplicationSlot->data.restart_lsn))
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user