public class PGReplicationConnectionImpl extends Object implements PGReplicationConnection
Constructor and Description |
---|
PGReplicationConnectionImpl(BaseConnection connection) |
Modifier and Type | Method and Description |
---|---|
ChainedCreateReplicationSlotBuilder |
createReplicationSlot()
Create replication slot, that can be next use in
PGReplicationConnection.replicationStream() |
void |
dropReplicationSlot(String slotName) |
ChainedStreamBuilder |
replicationStream()
After start replication stream this connection not available to use for another queries until
replication stream will not close.
|
public PGReplicationConnectionImpl(BaseConnection connection)
public ChainedStreamBuilder replicationStream()
PGReplicationConnection
replicationStream
in interface PGReplicationConnection
public ChainedCreateReplicationSlotBuilder createReplicationSlot()
PGReplicationConnection
Create replication slot, that can be next use in PGReplicationConnection.replicationStream()
Replication slots provide an automated way to ensure that the master does not remove WAL segments until they have been received by all standbys, and that the master does not remove rows which could cause a recovery conflict even when the standby is disconnected.
createReplicationSlot
in interface PGReplicationConnection
public void dropReplicationSlot(String slotName) throws SQLException
dropReplicationSlot
in interface PGReplicationConnection
slotName
- not null replication slot name exists in database that should be dropSQLException
- if the replication slot cannot be dropped.Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.