Re: pg_is_in_recovery=1

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_is_in_recovery=1
Date: 2010-12-13 20:32:23
Message-ID: AANLkTim13fRaF3rAnBQvMZsDgHJQ=N7C-9fdv0TXM3Q6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 13, 2010 at 12:48 AM, aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com> wrote:
> When pg_is_in_recovery in the table changes to zero(status change)??
> At the time when recovery stops?

Ah... yep.

> If switch over has to be done then, after receivibg the signal and telling
> the postgres to run the startup process (got_SIGHUP = true),
> shall we have to stop replication or wait for the recovery to get stop?
> Can I change this pg_is_in_recovery = 0?

Stopping replication and ending recovery are the same operation in
this case. In the case of a crash, we do recovery just to get back to
a consistent state. In the case of replication, we recover
continuously until failover is performed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2010-12-13 20:51:31 Re: CommitFest wrap-up
Previous Message Robert Haas 2010-12-13 20:30:22 Re: WaitLatch