Skip to content
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

cdc-sink pglogical #100

Closed
malligit opened this issue Mar 15, 2022 · 3 comments
Closed

cdc-sink pglogical #100

malligit opened this issue Mar 15, 2022 · 3 comments
Assignees

Comments

@malligit
Copy link

I am trying to start the cdc-sink for replicating the data from postgres db to crdb. i am using the below command

cdc-sink pglogical --publicationName <mc_publication> --sourceConn / --targetConn --targetDB <application_db>

i am getting the below error

error="no target db was configured"
i have the db configured in the target cluster.

Let me know what i am missing

@bobvawter
Copy link
Member

That check takes the value parsed in the CLI command here:
https://github.com/cockroachdb/cdc-sink/blob/master/internal/cmd/pglogical/pglogical.go#L45

And immediately checks the value in NewConn() here:
https://github.com/cockroachdb/cdc-sink/blob/master/internal/source/pglogical/conn.go#L110

Are you using any shell substitutions or environment variables to launch cdc-sink?

@bobvawter bobvawter self-assigned this Mar 16, 2022
@malligit
Copy link
Author

I am using command line and no shell script. I had to encode the password which has the special chars. Its working for me now after pwd encoding.

Thank you for the quick response.

cdc-sink pglogical is not loading the initial snapshot form source to destination, its replicating the data from the point when the cdc-sink pglogical started. Is there any option to load the initial snapshot of the data from source to destination when we start the cdc-sink pglogical?

@bobvawter
Copy link
Member

There is no backfilling at present; that's on the to-do list as #95. In the interim, you can run pg_dump after creating the replication slot. Import the bulk data into CRDB and then start cdc-sink.

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

No branches or pull requests

2 participants