-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat: Zero-ETL for PG #199
Conversation
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.
Looks exciting! This PR greatly simplifies the experience of Postgres replica setup.
A few comments:
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.
This is really an exciting feature that provisions an easy way to create a replication stream to PostgreSQL. It makes things simple, and as simple as possible is a good taste!
Here's my review comments.
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.
Thanks! LGTM
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.
LGTM!
Resolves: #176, #119
Features Added:
1.
CREATE SUBSCRIPTION
SupportThis PR introduces support for the
CREATE SUBSCRIPTION
SQL command in MyDuck Server. Users can now set up replication from a source PostgreSQL instance with the following SQL statement:CREATE SUBSCRIPTION mysub CONNECTION 'dbname=foo host=bar user=repuser' PUBLICATION mypub;
Automatic Slot and Publication Creation:
If the required replication slot and publication are not already present on the source PostgreSQL server, they will be created automatically during the execution of the
CREATE SUBSCRIPTION
command.2. Replica Mode with Docker
Added support for running MyDuck Server in replica mode, enabling seamless replication from a source PostgreSQL database at launch.
Usage Example:
The following
docker run
command demonstrates how to launch MyDuck Server in replica mode:docker run \ -p 3306:3306 \ -p 5432:5432 \ --privileged \ --detach \ --env SETUP_MODE=REPLICA \ --env SOURCE_DSN="postgres://postgres:[email protected]:15432" \ apecloud/myduckserver:latest
This simplifies the process of setting up replication directly from a PostgreSQL database.