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

can't configure PGSync on PG16 standby node #542

Open
xmiao-cn opened this issue May 10, 2024 · 1 comment
Open

can't configure PGSync on PG16 standby node #542

xmiao-cn opened this issue May 10, 2024 · 1 comment

Comments

@xmiao-cn
Copy link

PGSync version: 3.1.0

Postgres version: PG 16.2

Elasticsearch/OpenSearch version: ES7

Redis version:

Python version:

Problem Description: We want to configure PGSync from PG16.2's standby node to sync data to ES, but the setup steps involve like ' select pg_current_xact(); select * from txid_current();' , maybe there are other statements , which can't be executed on the standby node. What should I do in this case? I can't configure PGSync on PG's primary node to avoid impacting the application running, only can do this sync on standby node. Thanks a lot .

Error Message (if any):

cannot execute pg_current_xct_id() during recovery....... "SELECT * from TXID_CURRENT();"

@toluaina
Copy link
Owner

  • I don't think you can complete this setup on the standby.
  • even if you were able to get around this, the bootstrap step still needs to create a trigger against the target tables.
  • So it needs write access to the database.
  • Only thing I can think of is to create a read only operational mode for situations like this where you rely on the polling option but I'm not sure if this will be worthwhile given the low performance of polling.

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