# Class LogicalReplicationConnection

Namespace
  Npgsql.Replication

Assembly
  Npgsql.dll

Represents a logical replication connection to a PostgreSQL server.

    public sealed class LogicalReplicationConnection : ReplicationConnection, IAsyncDisposable

Inheritance
  object
  ReplicationConnection
  LogicalReplicationConnection

Implements
  IAsyncDisposable

Inherited Members
  ReplicationConnection.ConnectionString
  ReplicationConnection.LastReceivedLsn
  ReplicationConnection.LastFlushedLsn
  ReplicationConnection.LastAppliedLsn
  ReplicationConnection.WalReceiverStatusInterval
  ReplicationConnection.WalReceiverTimeout
  ReplicationConnection.PostgreSqlVersion
  ReplicationConnection.ServerVersion
  ReplicationConnection.CommandTimeout
  ReplicationConnection.Encoding
  ReplicationConnection.ProcessID
  ReplicationConnection.Open(CancellationToken)
  ReplicationConnection.DisposeAsync()
  ReplicationConnection.IdentifySystem(CancellationToken)
  ReplicationConnection.Show(string, CancellationToken)
  ReplicationConnection.TimelineHistory(uint, CancellationToken)
  ReplicationConnection.SetReplicationStatus(NpgsqlLogSequenceNumber)
  ReplicationConnection.SendStatusUpdate(CancellationToken)
  ReplicationConnection.DropReplicationSlot(string, bool, CancellationToken)
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.ReferenceEquals(object, object)
  object.ToString()

Extension Methods
  LogicalReplicationConnectionExtensions.CreateLogicalReplicationSlot(LogicalReplicationConnection, string, string, bool, LogicalSlotSnapshotInitMode?, bool, CancellationToken)
  LogicalReplicationConnectionExtensions.StartLogicalReplication(LogicalReplicationConnection, LogicalReplicationSlot, CancellationToken, NpgsqlLogSequenceNumber?, IEnumerable<KeyValuePair<string, string?>>?, bool)
  PgOutputConnectionExtensions.CreatePgOutputReplicationSlot(LogicalReplicationConnection, string, bool, LogicalSlotSnapshotInitMode?, bool, CancellationToken)
  PgOutputConnectionExtensions.StartReplication(LogicalReplicationConnection, PgOutputReplicationSlot, PgOutputReplicationOptions, CancellationToken, NpgsqlLogSequenceNumber?)
  TestDecodingConnectionExtensions.CreateTestDecodingReplicationSlot(LogicalReplicationConnection, string, bool, LogicalSlotSnapshotInitMode?, bool, CancellationToken)
  TestDecodingConnectionExtensions.StartReplication(LogicalReplicationConnection, TestDecodingReplicationSlot, CancellationToken, TestDecodingOptions?, NpgsqlLogSequenceNumber?)

## Constructors

### LogicalReplicationConnection()

Initializes a new instance of LogicalReplicationConnection.

    public LogicalReplicationConnection()

### LogicalReplicationConnection(string?)

Initializes a new instance of LogicalReplicationConnection with the given connection string.

    public LogicalReplicationConnection(string? connectionString)

#### Parameters

`connectionString` string

  The connection used to open the PostgreSQL database.