Re: Latest version of Hot Standby patch: unexpected error querying standby

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Latest version of Hot Standby patch: unexpected error querying standby
Date: 2009-01-04 14:22:58
Message-ID: 1231078978.4032.265.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-01-04 14:38:08 Re: Latest version of Hot Standby patch: unexpected error querying standby
Previous Message Markus Wanner 2009-01-04 14:14:02 Re: New patch for Column-level privileges