Updated on 2025-07-22 GMT+08:00

PGReplicationConnection

PGReplicationConnection is an API class provided by the JDBC driver in GaussDB. It is used to implement functions related to logical replication.

Inheritance Relationship of PGReplicationConnection

PGReplicationConnection is a logical replication API. Its implementation class is PGReplicationConnectionImpl, which is in the com.huawei.opengauss.jdbc.replication package. The declaration of the class is as follows:

public class PGReplicationConnection implements PGReplicationConnection

Constructor

public PGReplicationConnection(BaseConnection connection)

Common Methods

Table 1 Common methods of PGReplicationConnection

Method

Return Type

Description

Throws

createReplicationSlot()

ChainedCreateReplicationSlotBuilder

Creates a logical replication slot.

-

dropReplicationSlot(String slotName)

void

Drops a logical replication slot.

SQLException,IOException

replicationStream()

ChainedStreamBuilder

Enables logical replication.

-