Skip to content

Implement Logical Streaming Replication Protocol V4 - #5761

Merged
Brar merged 6 commits into
npgsql:mainfrom
Brar:Logical_Streaming_Replication_Protocol_V4
Jul 2, 2024
Merged

Brar merged 6 commits into
npgsql:mainfrom
Brar:Logical_Streaming_Replication_Protocol_V4

Conversation

@Brar

@Brar Brar commented Jun 22, 2024

Copy link
Copy Markdown
Member

Closes #5760

Since the streaming replication parameter is now an enum instead of a bool I adjusted PgOutputReplicationOptions to follow that change wich is breaking change in our API.
While breaking the API I also made the protocol version an enum.

@Brar
Brar requested review from roji and vonzshik as code owners June 22, 2024 17:55

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - but not sure about the protocol enum change - plus maybe we should start to try to be a bit more backwards-compatible... But nothing too important.

@Brar
Brar requested a review from roji June 29, 2024 10:15

@roji roji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good from my side - I'd still add back the removed constructor with [Obsolete] (see comment). Other than that see merge conflicts.

@Brar
Brar force-pushed the Logical_Streaming_Replication_Protocol_V4 branch from e30d7b7 to a5d532c Compare July 1, 2024 10:34
@Brar
Brar merged commit ea3b161 into npgsql:main Jul 2, 2024
public PgOutputReplicationOptions(string publicationName, ulong protocolVersion, bool? binary = null, bool? streaming = null, bool? messages = null, bool? twoPhase = null)
: this(new List<string> { publicationName ?? throw new ArgumentNullException(nameof(publicationName)) }, protocolVersion, binary, streaming, messages, twoPhase)
{ }
[Obsolete("Please switch to the overloads that take a PgOutputProtocolVersion value instead.")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Brar this looks odd - these are new constructor overloads which are [Obsolete]? I think the idea was to keep the original constructor (the one with bool? streaming and ulong protocolVersion), add [Obsolete] on it and just have it call the new one...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Logical Streaming Replication Protocol V4

3 participants