Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force Postgres to create new timeline

Tags:

postgresql

I have two servers that are slightly different. I want to use pg_rewind to make the two databases the same. I was told that it works when you do promote since postgres creates new timeline. However in my case the two databases are already "masters". Is it possible to tell postgres to create new timeline and then execute pg_rewind

Thanks Avi

like image 529
user1409708 Avatar asked Jul 01 '26 02:07

user1409708


1 Answers

Judging from your question, the answer seems to be that you can't accomplish what you want.

If these are two distinct servers, both primarys, so they accept data changes, even if you restored the same initial backup, they will not be able to stream one from the other (if that's what you want to accomplish - make one a standby of the other).

Maybe you could expand a bit, because based on what I read above, that's not possible with postgres.

like image 77
Martín Avatar answered Jul 02 '26 18:07

Martín



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!