Re: Failover architecture - Mailing list pgsql-general

From Tatsuo Ishii
Subject Re: Failover architecture
Date
Msg-id 20110818.082227.314355318037081036.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Failover architecture  ("Reuven M. Lerner" <reuven@lerner.co.il>)
Responses Re: Failover architecture
List pgsql-general
>       <li>Of course, Is there any easy way to do that?  If so, then what
>         happens when pgpool tries forward an INSERT to the master while
>         it's in read-only mode?

Assuming "read-only mode" is a database running in read-only
transaction mode(like standby), you will get errors something like
this:

ERROR:  cannot execute INSERT in a read-only transaction

  (For the record, I'm pretty sure that
>         there isn't any easy or obvious way to make a database
>         read-only, and that we can simulate read-only mode by adding
>         INSERT/UPDATE triggers on each of the four -- yes, only four --
>         tables in the database, silently ignoring data that's posted.  I
>         floated this with the project managers, and they were OK with
>         this idea -- but I wanted to double-check whether this is a
>         viable solution, or if there's an obvious pitfall I'm missing
>         and/or a better way to go about this.</li>

>       <li>If we use master-slave replication, and communication is cut
>         off, does the slave reconnect automatically?  I believe that the
>         answer is "yes," and that the replication will continue so long

Yes, as long as you turn on archive logging *and* keep enough archive
log segments.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

pgsql-general by date:

Previous
From: Lonni J Friedman
Date:
Subject: Re: streaming replication: one problem & several questions
Next
From: Craig Ringer
Date:
Subject: Re: Using Postgresql as application server