From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
Cc: | Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, 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:38:08 |
Message-ID: | 4960C9D0.3070607@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs wrote:
> 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?
Hmm, that's odd. Table creation calls RelationCreateStorage, which calls
smgrcreate and writes the WAL record. smgr_redo certainly does call
smgrcreate.
I can reproduce that too with CVS HEAD, so it's clearly a bug. I
probably introduced it with the recent smgr changes; I'll try to hunt it
down.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-01-04 14:59:36 | Re: Latest version of Hot Standby patch: unexpected error querying standby |
Previous Message | Simon Riggs | 2009-01-04 14:22:58 | Re: Latest version of Hot Standby patch: unexpected error querying standby |