Re: Latest version of Hot Standby patch: unexpected error querying standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Latest version of Hot Standby patch: unexpected error querying standby
Date
Msg-id 1231078978.4032.265.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Latest version of Hot Standby patch: unexpected error querying standby  (Mark Kirkwood <markir@paradise.net.nz>)
Responses Re: Latest version of Hot Standby patch: unexpected error querying standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Sun, 2009-01-04 at 22:18 +1300, Mark Kirkwood wrote:
> >>>
> >>> bench=# select now(),count(*) from history;
> >>> ERROR:  could not open relation base/16384/16394: No such file or
> >>> directory
> >>>     

> I'm guessing something tied up with the fact that history has no rows
> to 
> start with...

Good guess, thanks. I can recreate the error now, though not by
following the actions in the order you mentioned. I guess the files
hadn't applied fully before you ran the test.

The problem I can re-create looks like this:

1. Create standby set-up, with both primary and standby active
2. Create new table on primary, but don't add data; wait for apply
3. Attempt to access new table on standby, throws ERROR as shown
4. Add 1 row on primary; wait for apply
5. Attempt to access new table on standby, no ERROR

It looks to me like WAL for CREATE TABLE doesn't actually create a file,
we just rely on the ability of mdextend() to create the file if required
during recovery.

So it looks to me like either an outstanding error with current system,
or a new error introduced with recent-ish md/smgr changes. Second
opinion please Heikki, if you are available?

I'll come back to this in a few hours, but I have some other things need
to do right now.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Markus Wanner
Date:
Subject: Re: New patch for Column-level privileges
Next
From: Heikki Linnakangas
Date:
Subject: Re: Latest version of Hot Standby patch: unexpected error querying standby