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

New documents not being created on database insert #182

Open
lane711 opened this issue Sep 27, 2021 · 6 comments
Open

New documents not being created on database insert #182

lane711 opened this issue Sep 27, 2021 · 6 comments

Comments

@lane711
Copy link

lane711 commented Sep 27, 2021

Hello, I am running the docker version of the airbnb demo. When I insert new records into postgres, I am not seeing the elastic search document count increase. I do however see "Polling db airbnb: 2 item(s)" logged
Screen Shot 2021-09-27 at 12 52 55 PM
.

Also, are there instructions on how to setup pgsync for an existing database somewhere? I want to continue running pgsync in docker, but have it work with a db running on bare metal on my local Mac.

Thanks
Lane

@toluaina
Copy link
Owner

I think the getting started section might be the best things we have. https://pgsync.com/getting-started.
I can create a section specifically for setting up with an existing db.

The logs suggest it is pushing to Elasticsearch. Do you see any error previously?

@joshuafernandes1996
Copy link

@toluaina , even I am facing the same Issue. New records are not going to ES, but it is showing polling count correctly in PGSync logs. Also I noticed that if we restart PGSync all the records sync to ES correctly. But its not ideal to restart it everytime.

@toluaina
Copy link
Owner

Data is first held in the replication logs and sometimes this needs
to be processed first.
I have tried to improve the logging to indicate what pgsync is doing at each stage.
My guess is that the initial sync is not yet complete.
You can see how this works better with a smaller dataset.

@AnkitKundariya
Copy link

AnkitKundariya commented Dec 3, 2021

@toluaina

i did initial sync via bootstrap -c schema.json command and it's get done successfully now after a month new records not going to ES, but it's showing pulling count currently in PGSync logs. whenever I do pgsync -c schema.json it will pull new records to ES.

In which direction should I look?
Is there something wrong with the Replication slot?
What is the minimum replication slot required?

Is there a way we can make sure that all the data are get indexed and flush the logs from the replica slot and reset pgsync pulling count to 0 in files?

@toluaina
Copy link
Owner

toluaina commented Dec 3, 2021

@AnkitKundariya
The latest version on master should show you more details in the console.
Can you post the output here?
Also add/update a record in the db and post the result from the colsole

@Dipesh-Aspire
Copy link

@toluaina I have my schema with the following details:
ewwe

If i am trying to edit existing user, its reflecting the changes in Elasticsearch but its not reflecting new user entry in Elasticsearch. Delete is also working.

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

5 participants