Creating a very simple extension causing: ERROR: could not open file "base/6064585/9440403": No such file or directory

From: Robert Nix <robert(at)urban4m(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Creating a very simple extension causing: ERROR: could not open file "base/6064585/9440403": No such file or directory
Date: 2013-09-03 14:44:35
Message-ID: CAC2EkfPNOQfNMWYyKxbodGmTzsrhFdZUFj9XgJYEo0NN+-XHaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I narrowed the issue down to trying to select from a view being created in
the same extension, like so:

create or replace view av as select 1 as a;
create table ax as select * from av;

Even just selecting from the view after creating it causes the error so
it's the access to the view that's the issue, not the creation of the
table. It's as if the view isn't being created. But if i don't try to
create the table, the view (and extension) will successfully be created and
i can access the view just fine and create the table from it.

Additionally, converting the extension to a flat .sql script shows that it
works just fine. My only suspicion is that it's something to do with the
postgresql processes that are executing the extension rather than my user
process (which is the same user that owns the postgresql processes, i.e.
postgres).

Lastly, i can't reproduce this on 9.2 but i also can't yet upgrade to 9.2
on this host.

How can i diagnose/debug this? Steps i've taken so far:
- full fsck - no issues
- enabling full debug logs at all levels in postgresql.conf reveals no any
additional information whatsoever. strace of the postgres process was also
not useful.

*Host details:*
Linux pg1 3.5.0-34-generic #55-Ubuntu SMP Thu Jun 6 20:18:19 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux
PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compiled by gcc
(Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2, 64-bit

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-09-03 15:01:57 Re: ALTER TABLE transaction isolation problem
Previous Message David Johnston 2013-09-03 14:42:06 Re: ALTER TABLE transaction isolation problem