Class PgOutputReplicationOptions
- Namespace
- Npgsql.Replication.PgOutput
- Assembly
- Npgsql.dll
Options to be passed to the pgoutput plugin
public class PgOutputReplicationOptions : IEquatable<PgOutputReplicationOptions>
- Inheritance
-
PgOutputReplicationOptions
- Implements
- Inherited Members
Constructors
PgOutputReplicationOptions(IEnumerable<string>, ulong, bool?, bool?, bool?, bool?)
Creates a new instance of PgOutputReplicationOptions.
public PgOutputReplicationOptions(IEnumerable<string> publicationNames, ulong protocolVersion, bool? binary = null, bool? streaming = null, bool? messages = null, bool? twoPhase = null)
Parameters
publicationNames
IEnumerable<string>The publication names to include into the stream
protocolVersion
ulongThe version of the logical streaming replication protocol
binary
bool?Send values in binary representation
streaming
bool?Enable streaming of in-progress transactions
messages
bool?Write logical decoding messages into the replication stream
twoPhase
bool?Enable streaming of prepared transactions
PgOutputReplicationOptions(string, ulong, bool?, bool?, bool?, bool?)
Creates a new instance of PgOutputReplicationOptions.
public PgOutputReplicationOptions(string publicationName, ulong protocolVersion, bool? binary = null, bool? streaming = null, bool? messages = null, bool? twoPhase = null)
Parameters
publicationName
stringThe publication names to include into the stream
protocolVersion
ulongThe version of the logical streaming replication protocol
binary
bool?Send values in binary representation
streaming
bool?Enable streaming of in-progress transactions
messages
bool?Write logical decoding messages into the replication stream
twoPhase
bool?Enable streaming of prepared transactions
Properties
Binary
Send values in binary representation
public bool? Binary { get; }
Property Value
- bool?
Remarks
This works in PostgreSQL versions 14+
Messages
Write logical decoding messages into the replication stream
public bool? Messages { get; }
Property Value
- bool?
Remarks
This works in PostgreSQL versions 14+
ProtocolVersion
The version of the Logical Streaming Replication Protocol
public ulong ProtocolVersion { get; }
Property Value
PublicationNames
The publication names to stream
public List<string> PublicationNames { get; }
Property Value
Streaming
Enable streaming of in-progress transactions
public bool? Streaming { get; }
Property Value
- bool?
Remarks
This works as of logical streaming replication protocol version 2 (PostgreSQL 14+)
TwoPhase
Enable streaming of prepared transactions
public bool? TwoPhase { get; }
Property Value
- bool?
Remarks
This works in PostgreSQL versions 15+
Methods
Equals(PgOutputReplicationOptions?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(PgOutputReplicationOptions? other)
Parameters
other
PgOutputReplicationOptionsAn object to compare with this object.
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.