Re: [GENERAL] cache lookup of relation 165058647 failed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org>, Juris Krumins <juriskr(at)komin(dot)lv>
Subject: Re: [GENERAL] cache lookup of relation 165058647 failed
Date: 2004-05-04 05:55:23
Message-ID: 465.1083650123@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Sean Chittenden <sean(at)chittenden(dot)org> writes:
> But, I am suspecting that it's a race condition with the new background
> writer code.

Why? Have you demonstrated that the failure does not occur in 7.4?

> psql:test-end2.sql:3: ERROR: cache lookup failed for relation 398033
> CONTEXT: SQL query "SELECT TRUE FROM pg_catalog.pg_class c LEFT JOIN
> pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relname =
> 'tmptbl'::TEXT AND c.relkind = 'r'::TEXT AND
> pg_catalog.pg_table_is_visible(c.oid)"

I think that pg_table_is_visible() will inspect the catalogs using
SnapshotNow semantics, while the above query will feed it with OIDs that
were valid under a start-of-query snapshot. So I'd expect failures in
any recent PG version, if tables are being dynamically created/deleted
by concurrent transactions.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sean Chittenden 2004-05-04 07:06:51 Re: [GENERAL] cache lookup of relation 165058647 failed
Previous Message Stephan Szabo 2004-05-04 05:32:22 Re: Erro

Browse pgsql-general by date

  From Date Subject
Next Message Matthew T. O'Connor 2004-05-04 05:59:54 Re: Pop 3 Emails to Postgresql
Previous Message Greg Stark 2004-05-04 05:30:20 Re: Tracking structural changes from psql