streaming replication and recovery

From: Anupama Ramaswamy <anumr_0123(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: streaming replication and recovery
Date: 2014-04-05 10:48:29
Message-ID: 1396694909.82811.YahooMailNeo@web160304.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have 2 postgres nodes setup in a replication and hot standby configuration. I am using pgpool for automatic failover and load balancing the read queries.

I have setup scripts for automatic failover when the master node fails. I want to understand how it would work in the following 2 scenarios. 
touch /tmp/pgsql.failover  - which is the trigger file.
I dont use pg_standby in my recovery process

Scenario 1
----------------
Suppose the secondary server is lagging behind the primary at the time of primary failure, will the secondary completely catch up to the primary state, before stopping replication. Or what in the process ensures this happens ?

Scenario 2
------------------
Both primary and secondary are running. 
Secondary goes down at time t1. 
Now primary goes down at t2. At this point, the trigger file is created.
Secondary node restarts at time t3.
What happens to all the transactions that occurred between t1 and t2.

Regards,
Anupama.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Boreham 2014-04-05 15:13:45 Re: SSD Drives
Previous Message David Rees 2014-04-05 06:22:31 Re: SSD Drives