-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgrepl: parse replication statements + handle IDENTIFY_SYSTEM #106131
Merged
Conversation
This file contains 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
35 tasks
otan
force-pushed
the
extended_proto
branch
2 times, most recently
from
July 5, 2023 03:54
f1d1279
to
fafa157
Compare
cucaroach
approved these changes
Aug 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
otan
force-pushed
the
extended_proto
branch
3 times, most recently
from
August 7, 2023 13:46
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
bors r=cucaroach |
Build succeeded: |
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.Statement
instead of
pgrepltree.ReplicationStatement
for compatibility withparser.Parse...
.I've left the
LSN
fields 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 SYNTAX
yet. 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