Re: Pg 9.1 master-slave replication

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Prashanth Ranjalkar <prashant(dot)ranjalkar(at)gmail(dot)com>, Viktor <viktor(at)okservers(dot)eu>
Cc: "gilberto(dot)castillo(at)etecsa(dot)cu" <gilberto(dot)castillo(at)etecsa(dot)cu>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Pg 9.1 master-slave replication
Date: 2013-02-21 18:23:25
Message-ID: 1361471005.93321.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Prashanth Ranjalkar <prashant(dot)ranjalkar(at)gmail(dot)com> wrote:

>> Hello, Could explain somebody what will happen, if the slave

> It depends on the type of replication is used.
>
> If it's a slony replication then master continues to work and
> will catch up when slave is available.
>
> However if the Streaming replication is used, [...] once it fills
> all the space, master may go down.

That strikes me a false distinction -- Slony also stores data to be
replicated until the slave becomes available.  Either way you can
control where that is stored, and you need to watch out for space
problems on an extended outage of a replica.

An issue I don't think I've seen mentioned is that if you use
synchronous replication you are telling PostgreSQL not to return an
indication of success for a data-modifying transaction until the
work of that transaction has been persisted on at least one
replica.  To avoid stalls on the master, you may want to define
multiple synchronous replicas, so that when one goes down you keep
running without DBA intervention.

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ned Wolpert 2013-02-21 19:47:34 Re: Database corruption event, unlockable rows, possibly bogus virtual xids? (-1/4444444444)
Previous Message Ned Wolpert 2013-02-21 18:16:42 Database corruption event, unlockable rows, possibly bogus virtual xids? (-1/4444444444)