Package org.postgresql.replication
Interface PGReplicationConnection
-
- All Known Implementing Classes:
PGReplicationConnectionImpl
public interface PGReplicationConnection
Api available only if connection was create with required for replication properties:PGProperty.REPLICATION
andPGProperty.ASSUME_MIN_SERVER_VERSION
. Without it property building replication stream fail with exception.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChainedCreateReplicationSlotBuilder
createReplicationSlot()
Create replication slot, that can be next use inreplicationStream()
void
dropReplicationSlot(java.lang.String slotName)
ChainedStreamBuilder
replicationStream()
After start replication stream this connection not available to use for another queries until replication stream will not close.
-
-
-
Method Detail
-
replicationStream
ChainedStreamBuilder replicationStream()
After start replication stream this connection not available to use for another queries until replication stream will not close.- Returns:
- not null fluent api for build replication stream
-
createReplicationSlot
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.
- Returns:
- not null fluent api for build create replication slot
-
dropReplicationSlot
void dropReplicationSlot(java.lang.String slotName) throws java.sql.SQLException
- Parameters:
slotName
- not null replication slot name exists in database that should be drop- Throws:
java.sql.SQLException
- if the replication slot cannot be dropped.
-
-