Re: Turn off streaming replication - leaving Master running

From: Andy Erskine <andy(dot)erskine(at)jds(dot)net(dot)au>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Turn off streaming replication - leaving Master running
Date: 2015-06-29 05:57:22
Message-ID: CADqp7UB9nHWhsjeHQw0bhoXBkBy5WXvtSiHCnQ_YKoGXC4bmoA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Cheers Micheal,

So i don't want to touch the file as this will promote it too a master - i
would just like it as a standalone db for this instance - i need to load a
db and do some testing.

After which i will delete the data directory and run the basebackup cmd and
pull the db back from the master and set up streaming again.

Just need to be certain of the right steps so i don't effect the Master in
any way.

On 29 June 2015 at 15:52, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:

> On Mon, Jun 29, 2015 at 2:42 PM, Andy Erskine <andy(dot)erskine(at)jds(dot)net(dot)au>
> wrote:
> > I'd like to turn off the streaming on my postgresdb (9.2) It is currently
> > setup to stream from master to a single secondary.
> >
> > I want to shutdown the secondary and turn it into another master and
> connect
> > it to another application for testing - after which i want to revert it
> back
> > to a streaming secondary.
>
> What kind of tests? If this is read-only activity you could simply cut
> the network connection between the master and the slave, or restart
> the slave after updating recovery.conf such as it is still a standby
> but has no primary_conninfo so as it is performing archive recovery,
> or at least a fake one.
>
> > Is this possible while not touching the Master DB ? If so what are the
> > correct steps pls ?
>
> Well, yes. It depends on what you want to do then. If this testing
> really requires to promote the standby then you will need to take a
> new fresh base backup knowing that you are using 9.2.
> Regards,
> --
> Michael
>

--

*Andy Erskine*

*JDS Australia*
*P* 1300 780 432 | *M* 0431919301 | *F* 03 90124578

*E:* *andy(dot)erskine(at)jds(dot)net(dot)au <andy(dot)erskine(at)jds(dot)net(dot)au>*

*W*: www.jds.net.au
Level 8, 2 Russell Street, Melbourne, VIC 3000
GPO Box 4777, Melbourne VIC 3001

[image: JDS Signature v1]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Charles Clavadetscher 2015-06-29 05:57:43 Re: create index on a field of udt
Previous Message Michael Paquier 2015-06-29 05:52:49 Re: Turn off streaming replication - leaving Master running