1

I have 2 identical PostgreSQL 13 server and configured streaming replication for both server. (nodeA is master, nodeB is slave) It working very well normally. All DML, DDL operation replicates properly

My problem is about disaster scenario. I am stopping master server like disaster And then I am promoting slave server with following command

pg_ctl promote -D $PGDATA 

And then I am testing insert/delete/update commands working properly on nodeB, it works

So I want to switch nodeA to as new slave server. I am applying pg_rewind command to sync timeline, it worked very well too

But could not figured out how can I configure and start nodeA as new standby ?

If I could do it I will also try to switch operation again

Best regards

1 Answer 1

2

You turn the old, rewound master into a standby server just like you created the standby in the first place:

  • set primary_conninfo correctly in postgresql.conf

  • create the standby.signal file in the data directory

  • start the server

1
  • Hello Sorry for delayed update, I was thinking different so my way thinking does not fit to the concept. Thx Dec 13, 2021 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.