toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.16k stars 180 forks source link

can't configure PGSync on PG16 standby node #542

Open xmiao-cn opened 4 months ago

xmiao-cn commented 4 months ago

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 commented 3 months ago