public interface PGReplicationConnection
PGProperty.REPLICATION
and PGProperty.ASSUME_MIN_SERVER_VERSION
. Without it property
building replication stream fail with exception.Modifier and Type | Method and Description |
---|---|
ChainedCreateReplicationSlotBuilder |
createReplicationSlot()
Create replication slot, that can be next use in
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.
|
ChainedStreamBuilder replicationStream()
ChainedCreateReplicationSlotBuilder createReplicationSlot()
Create replication slot, that can be next use in 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.
void dropReplicationSlot(String slotName) throws SQLException
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.