Log Apply Delay

From: Ian Harding <harding(dot)ian(at)gmail(dot)com>
To: General PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Log Apply Delay
Date: 2011-09-16 15:02:31
Message-ID: CAMR4UwF=4xjfkbts7g=WkukdPuskjMp4f3MoH7qVN3Rqe7y24Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oracle has a configuration option for its version of hot standby
(DataGuard) that lets you specify a time based delay in applying logs.
They get transferred right away, but changes in them are only applied
as they reach a certain age. The idea is that if something horrible
happens on the master, you can keep it from propagating to one or more
of your standby databases (or keep from having to reinstate one in the
case of a failover)

Anyway, Is there any plan to add a knob like that to the streaming
replication in Postgres?

Hypothetically, if I had a standby database with max_standby_*_delay
set to -1, and there had been a long running query so log apply was an
hour behind, could I use that database for point in time recovery if
something went wrong on the primary? Say something bad happened on
primary, and I rushed over to the standby (in this delayed situation)
and shut it down. Could I then alter the recovery.conf and have it
come up read/write at a point in time? Seems like I could....

- Ian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Lelarge 2011-09-16 15:33:17 Re: Log Apply Delay
Previous Message Vick Khera 2011-09-16 14:17:10 Re: PostgreSQL benchmarked on XFS vs ZFS vs btrfs vs ext4