Re: Setting up HA postgresql

From: William Dunn <dunnwjr(at)gmail(dot)com>
To: Aviel Buskila <aviel33(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Setting up HA postgresql
Date: 2015-07-21 18:14:20
Message-ID: CAEva=V=mAAL7RgFw9oeBQTjrpkDhEdP5LgaiBGOmUbFUHmtM8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Implementing failover logic is quite simple, and probably even preferred
over a pre-built solution because you can implement it in the way that
integrates well with your architecture.

The basic logic is as follows:

- On the standby server you would configure the "trigger" file. When you
create a trigger file with the name you specify the standby will promote to
master.
- You have your queries send to the master.
- If your application starts failing to connect to the master you would
have logic evaluate why
- When the master goes down you should
- Generate a trigger file to promote the standby to master
- Modify your DNS entries to have your applications point to the new
master

*Will J. Dunn*
*willjdunn.com <http://willjdunn.com>*

On Tue, Jul 21, 2015 at 12:20 PM, Aviel Buskila <aviel33(at)gmail(dot)com> wrote:

> hey will,
> Is there any open-source tool instead of developing the fail-over logic by
> myself?
>
> 2015-07-21 18:34 GMT+03:00 William Dunn <dunnwjr(at)gmail(dot)com>:
>
>> Hello Aviel,
>>
>> On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila <aviel33(at)gmail(dot)com> wrote:
>>>
>>> How can I set a highly available postgresql in a share-nothing
>>> architecture?
>>>
>>
>> I suggest you review the official documentation on high-availability
>> configurations linked below:
>> http://www.postgresql.org/docs/current/static/high-availability.html
>>
>> The most common configuration is to use PostgreSQL's built in
>> master/standby streaming replication. However you will need to develop any
>> fail-over logic you need yourself or use a third party tool such as
>> EnterpriseDB's Failover Manager.
>>
>> *Will J. Dunn*
>> *willjdunn.com <http://willjdunn.com>*
>>
>> On Tue, Jul 21, 2015 at 3:56 AM, Aviel Buskila <aviel33(at)gmail(dot)com> wrote:
>>
>>> Hey,
>>> How can I set a highly available postgresql in a share-nothing
>>> architecture?
>>>
>>>
>>>
>>> Best regards,
>>> Aviel B.
>>>
>>
>>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-07-21 18:25:58 Re: Cannot reach pg server using -h localhost
Previous Message William Dunn 2015-07-21 18:04:56 Re: Setting up HA postgresql