2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
989 stars 152 forks source link

pglogical apply PID exited with exit code 1 #402

Open jitesh-co opened 1 year ago

jitesh-co commented 1 year ago

Base Info

Both on source & target:

Example -

When we try to move data from one shard to a new instance which also has several read replicas, we get pglogical error. In our understanding, the process to copy data of a space using pglogical always consists of two main phases:

The issue we observe consistently happens just after the initial data copy, when it is pivoting to the replication phase. Shortly after the subscription state goes from sync_data to replicating, it goes to state “down” (which is usually indicative of a problem) and does not recover. 2022-11-09 11:54:45 UTC::@:[352]:LOG: background worker "pglogical apply 16421:2167242526" (PID 21218) exited with exit code 1

eulerto commented 1 year ago

Could you provide a test case? Did you check for error messages before the provided log message? You need to provide more than just a subscription status. Start with:

SELECT * FROM pglogical.local_sync_status WHERE sync_status <> 'r';
dubek commented 8 months ago

Note that if the config has pglogical.conflict_log_level = ERROR, then the apply process will exit after logging the conflict details. You should set the level to warning or notice.