Re: Best way to stop Streaming Replication?

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Best way to stop Streaming Replication?
Дата
Msg-id CANzqJaB7sWG9PKJ3-=PXMwLRJEg9SNKmLcE_VxkBe-BxF=ijuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Best way to stop Streaming Replication?  (Samed YILDIRIM <samed@reddoc.net>)
Ответы Re: Best way to stop Streaming Replication?  (Samed YILDIRIM <samed@reddoc.net>)
pg_repack vs. running logical/physical replication  (Dirk Krautschick <dirk.krautschick@googlemail.com>)
Список pgsql-admin
On Fri, Dec 22, 2023 at 4:38 PM Samed YILDIRIM <samed@reddoc.net> wrote:
Hi Ron,

What is your main goal?

The main goal is to stop replication, not pause it.  (I chose the word carefully, but your questions are understandable.)
 
What is the purpose of stopping replication?
What will you do with replication when you have stopped it?
Are you trying to stop replaying transaction logs from the master and keep the replica running?

Want the replica still up, but does not matter if it's in replica mode.
 
Will you resume log replay at some point?

No.
 
Do you want to break replication completely while keeping standby receiving read-only queries?

How do you do that?
 

Yes, that's for pausing, not stopping.
 
Best regards.
Samed YILDIRIM


On Fri, 22 Dec 2023 at 23:12, kaido vaikla <kaido.vaikla@gmail.com> wrote:
Use a some tools like patroni. I'm patroni user since 2016 and happy with it.
br
Kaido

On Fri, 22 Dec 2023, 21:49 Ron Johnson, <ronljohnsonjr@gmail.com> wrote:
PG 14.10 and 15.5, if it matters.

Running pg_terminate_backend() on the walsender pid (and then dropping the replication slot) seems the canonical solution, based on StackExchange, but that leaves primary_conninfo in postgresql.auto.conf and standby.signal in $PGDATA.

Promoting the secondary (and then dropping the replication slot) handles all those issues, but leaves it in R/W mode, which might cause split brain issues with cluster managers.

Is there a better way than the two I've described

В списке pgsql-admin по дате отправления:

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: Need inputs on postgresql HA with consul cluster
Следующее
От: Rajesh Kumar
Дата:
Сообщение: Switchover