pgrepl: parse replication statements + handle IDENTIFY_SYSTEM#106131
Merged
craig[bot] merged 4 commits intocockroachdb:masterfrom Aug 8, 2023
Merged
pgrepl: parse replication statements + handle IDENTIFY_SYSTEM#106131craig[bot] merged 4 commits intocockroachdb:masterfrom
craig[bot] merged 4 commits intocockroachdb:masterfrom
Conversation
Member
35 tasks
f1d1279 to
fafa157
Compare
cucaroach
approved these changes
Aug 2, 2023
Contributor
cucaroach
left a comment
There was a problem hiding this comment.
Reviewed 7 of 7 files at r1, 21 of 21 files at r2, 3 of 3 files at r3, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @rafiss)
7305eed to
f7fe19a
Compare
In line with PostgreSQL, we prohibit the use of the extended protocol when the replication protocol is in effect. Release note: None
This commit implements IDENTIFY_SYSTEM in the replication protocol, which is used to retrieve metadata about replication state. Most of this commit involves changing assumptions throughout the codebase there is 1 parser - there is 2 if replication mode is enabled. We've also had to change the parser to return `statements.Statement` instead of `pgrepltree.ReplicationStatement` for compatibility with `parser.Parse...`. I've left the `LSN` fields as placeholders for now as we finalise on what we'll eventually call it. Release note: None
Currently on the CLI, the command must parse on the server for it to run. For replication related commands, we have not implemented `SHOW SYNTAX` yet. This is a bit of effort and seems outside the scope of what we want for now. For now, handle replication commands by no-oping them. Release note: None
Release note: None
Contributor
Author
|
bors r=cucaroach |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Informs: #105130
pgwire: ban extended protocol with REPLICATION protocol
In line with PostgreSQL, we prohibit the use of the extended protocol
when the replication protocol is in effect.
Release note: None
pgrepl: implement IDENTIFY_SYSTEM command
This commit implements IDENTIFY_SYSTEM in the replication protocol,
which is used to retrieve metadata about replication state.
Most of this commit involves changing assumptions throughout the
codebase there is 1 parser - there is 2 if replication mode is enabled.
We've also had to change the parser to return
statements.Statementinstead of
pgrepltree.ReplicationStatementfor compatibility withparser.Parse....I've left the
LSNfields as placeholders for now as we finalise onwhat we'll eventually call it.
Release note: None
sql: no-op SHOW SYNTAX in replication mode
Currently on the CLI, the command must parse on the server for it to
run. For replication related commands, we have not implemented
SHOW SYNTAXyet. This is a bit of effort and seems outside the scope of whatwe want for now.
For now, handle replication commands by no-oping them.
Release note: None