switching replication from standard asynch to slots

From: Mike Broers <mbroers(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: switching replication from standard asynch to slots
Date: 2016-12-09 19:48:12
Message-ID: CAB9893jPC=bPS9JatNZ8U4QjPFC1K3PZfaEt0kKgjWAE=kY+VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have a few production environments that use vanilla streaming
replication. (9.5 and 9.6)

I'm curious if I can create the replication slot on the primary host,
shutdown postgres on the secondary replica, update the recovery.conf to
include the primary_slot_name, and restart postgres on the replica to
effectively 'switch' over to use the slot for streaming without repriming
with a fresh pg_basebackup.

Also curious if I get into a pickle because of limits in pgsql_xlog disk
space if I can just shut down the replica, remove the slot information, and
do whatever cleanup is required on the primary and restart the replica with
the slot information removed from the recovery.conf and go back to vanilla
streaming replication without repriming.

Anyone do this kind of slot/streaming switcheroo?

Mike

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sreekanth Palluru 2016-12-11 03:00:03 Re: [ADMIN] Would like to below scenario is possible for getting page/block corruption
Previous Message hubert depesz lubaczewski 2016-12-09 16:22:56 Re: change pid/gid