Postgres BDR repair/rebuild / WAL files trouble

Status
Not open for further replies.

TC Dan

New Member
Sep 6, 2018
8
1
3
53
We are running a 2-node Master-Master-BDR with postgres and 2nd Quadrant BDR on Postgres 9.4.
As a matter of fact we don't use it as BDR at the moment but more as a Hot-Standby, because we couldn't handle some client firewall issues properly with real BDR.

Our BDR is broken at the moment and WAL files keep piling up at the "Master", filling up the partition.
Logs on "master" say:

Code:
2023-10-29 06:30:31.430 CET [6721] postgres@fusionpbx LOG:  starte logisches Dekodieren für Slot »bdr_16384_6745837976646251170_1_16384__«
2023-10-29 06:30:31.430 CET [6721] postgres@fusionpbx DETAIL:  Streaming beginnt bei Transaktionen, die nach 9/B434B470 committen; lese WAL ab 9/7064118
2023-10-29 06:30:31.430 CET [6721] postgres@fusionpbx FEHLER:  das angeforderte WAL-Segment 000000010000000900000007 wurde schon entfernt

(English would be roughly "starting logical decoding" -- " DETAIL Stream starts at transactions after .., reading WAL starting at" -- "ERROR requested WAL segment has been removed already")

Logs on "replica" say:

Code:
2023-11-05 06:33:57.659 CET [836] LOG:  starting background worker process "bdr (6745837976646251170,1,16384,)->bdr (6745838041284819794,1,"
2023-11-05 06:33:57.702 CET [28606] [unknown]@fusionpbx ERROR:  data stream ended

- Is there an easy way to rebuild BDR? I.e. tell "replica" to forget all it ever knew and get the current state from "master" to start freshly from there? (I'm really not good at postgres, need instructions for dummies)

- Alternatively: Is there an easy way to tell "master" to forget it ever was part of a cluster and continue on its own in the future?
 
Status
Not open for further replies.