Sean Chittenden <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to