Skip site navigation (1) Skip section navigation (2)

Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-02-18 11:37:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committerspgsql-docspgsql-hackers
On Fri, Feb 12, 2010 at 2:29 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> So the only major feature we're missing is the ability to clean up old
> files.

I found another missing feature in new file-based log shipping (i.e.,
standby_mode is enabled and 'cp' is used as restore_command).

After the trigger file is found, the startup process with pg_standby
tries to replay all of the WAL files in both pg_xlog and the archive.
So, when the primary fails, if the latest WAL file in pg_xlog of the
primary can be read, we can prevent the data loss by copying it to
pg_xlog of the standby before creating the trigger file.

On the other hand, the startup process with standby mode doesn't
replay the WAL files in pg_xlog after the trigger file is found. So
failover always causes the data loss even if the latest WAL file can
be read from the primary. And if the latest WAL file is copied to the
archive instead, it can be replayed but a PANIC error would happen
because it's not filled.

We should remove this restriction?


Fujii Masao
NTT Open Source Software Center

In response to


pgsql-docs by date

Next:From: Bruce MomjianDate: 2010-02-19 00:16:30
Subject: Re: Hot Standby documentation updates
Previous:From: Greg SmithDate: 2010-02-18 08:11:21
Subject: Hot Standby documentation updates

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-02-18 12:17:40
Subject: Re: A thought: should we run pgindent now?
Previous:From: Magnus HaganderDate: 2010-02-18 11:14:50
Subject: Re: Streaming replication on win32, still broken

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-02-18 12:23:17
Subject: Re: [COMMITTERS] pgsql: Introduce WAL records to log reuse of btree pages, allowing
Previous:From: Heikki LinnakangasDate: 2010-02-18 11:13:46
Subject: pgsql: Fix pq_getbyte_if_available() function.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group