Re: "could not open relation with OID" errors after promoting the standby to master

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "could not open relation with OID" errors after promoting the standby to master
Date: 2012-05-24 16:35:06
Message-ID: 4FBE633A.1020001@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 24.05.2012 18:16, Robert Haas wrote:
> On Thu, May 24, 2012 at 10:13 AM, Joachim Wieland<joe(at)mcknight(dot)de> wrote:
>> I wouldn't have assumed any corruption was possible given that I did
>> clean shutdowns on both sides...
>
> The thing that's worrying me is that there's not really any such thing
> as a "clean" shutdown on a standby. When you shut down the master, it
> checkpoints. When you shut down the standby, it can't checkpoint, so
> I think it's still going to enter recovery at startup. It'd be
> interesting to know where that recovery began and ended as compared
> with the minimum recovery point just before the shutdown.

Perhaps we should introduce the concept of a clean standby shutdown. We
can't write a checkpoint record, but we could write the same information
somewhere else. Like in the control file. At startup, we'd see that we
did a clean shutdown at WAL point X/X, and start up without having to
read through all the WAL from the last master checkpoint.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei KaiGai 2012-05-24 16:42:30 Re: [RFC] Interface of Row Level Security
Previous Message Tom Lane 2012-05-24 16:08:57 Re: [9.2] crash on regex