Re: Queries Regarding Postgresql Replication - Mailing list pgsql-general

From Josh Kupershmidt
Subject Re: Queries Regarding Postgresql Replication
Date
Msg-id BANLkTi=YiPZgBaXsOBOJoAkJs0eh3DMZbw@mail.gmail.com
Whole thread Raw
In response to Queries Regarding Postgresql Replication  (Nithya Rajendran <r-nithya@hcl.com>)
List pgsql-general
On Thu, May 5, 2011 at 7:33 AM, Nithya Rajendran <r-nithya@hcl.com> wrote:

[Disclaimer: I have minimal experience with hot standby, the below is
just from reading the docs]

> ===> How to find whether current postgres is running as master or slave?

SELECT pg_is_in_recovery();
will tell you (should be false for the master, true for the slave).

> ====> What is the procedure to make the failed master as working slave?

You mean, after you've failed over from A to B, how to bring A back up
as a slave of B? You should be able to just follow the steps of
setting up a master-slave pair, with B as the new master, and A the
new slave.

Josh

pgsql-general by date:

Previous
From: Toby Corkindale
Date:
Subject: Re: Fwd: Re: SSDD reliability
Next
From: John Cheng
Date:
Subject: Re: Cannot reproduce why a query is slow