Re: Automatic trigger to backup

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: Vinay Sarvana <vinay(dot)dhoom(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Automatic trigger to backup
Date: 2010-05-14 10:28:46
Message-ID: AANLkTiksSQcrbnGBLpAj3HjgsEJ5eH9ENjSXf-d3NIZZ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, May 14, 2010 at 1:55 AM, Vinay Sarvana <vinay(dot)dhoom(at)gmail(dot)com>wrote:

> Hi. Is there any possibility for creating trigger file automatically in
> postgres. Scenario is as follows :
>
> There are some application which is having this postgres database. There
> are main & backup database. Application is normally connected to first
> server. If main server fails, application should connect to backup server.
> This is PITR environment where WAL files are transferring from the main to
> backup.
>
> Manually we are creating the trigger file for that application to connect
> to backup database which will be master. Then we need to make previous
> master as slave.
>
> I need to know the automatic creation of trigger file....?
>

The trigger file is not automatically created, you would need to do that
yourself. You could always write a script to fire from cron to check if the
master database was done, but be careful, if your network cable comes
unplugged, you may end up triggering a failover event that you don't need
to. Just make sure that your master server is resilient and that whatever
script you write doesn't create the trigger file until after having done
multiple connection attempts.

--Scott

>
> Vinay
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Narasimha Murthy-VRFX87 2010-05-14 12:52:04 Clarification required: autovacuum and VACUUM command mode
Previous Message Yeb Havinga 2010-05-14 07:13:17 Re: List traffic