Re: cache lookup of relation 165058647 failed

From: Juris Krumins <juriskr(at)komin(dot)lv>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: cache lookup of relation 165058647 failed
Date: 2004-04-14 12:18:02
Message-ID: 20040414151230.K61393@juriskr_workstation
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general


On Wed, 14 Apr 2004, Richard Huxton wrote:

> On Wednesday 14 April 2004 10:35, Juris Krumins wrote:
>
> > 2004-04-14 12:24:54 [74021] LOG: query: SELECT d.config_id, d.text1 as
> > text, d.field_name,
> > 2004-04-14 12:24:54 [74021] LOG: duration: 0.005295 sec
> > 2004-04-14 12:24:54 [74021] LOG: query: CREATE TEMP TABLE tmp_table1 AS
> > SELECT advert.id, (SELECT employer.fullname FROM employer WHERE
> > advert.empid=employer.id) as emp_name, (CASE WHEN advert.status1 = 'A'
> > THEN advert.postname1 ELSE advert.postname2 END) as postname, (SELECT
> > cd.name FROM catalog_names cd WHERE advert.industry=cd.catalog_id AND
> > cd.language_id=1) AS f1002, (CASE WHEN status1='A' THEN
> > advert.obligations1 ELSE advert.obligations2 END) as obligations1 FROM
> > good_adv as advert
> > 2004-04-14 12:24:54 [74021] ERROR: cache lookup of relation 165058647
> > failed
>
> The error is complaining about a relation that used to have an OID of
> 165058647. This is almost certainly a temporary table. Are there any plpgsql
> functions referring to a temporary table, or do you create, drop, recreate
> tmp_table1 within the same connection?
>
> --
> Richard Huxton
> Archonet Ltd
>
There is actually no creation, droping, recreation of tmp_table1 within
the same connection. The only thing is that good_adv is not actually a
table, but a view. Can it be reason for this problem ?
The second thing is that queries I'v posted before going actually the same
way, first of all create temporary table, then making couple select
queries to that temporary table and that's all. The problem is that i use
such method all over my web site, that's why create temp table tmp_table1
... are quite large. Coulde it be problem ?

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-04-14 12:44:50 Re: cache lookup of relation 165058647 failed
Previous Message Richard Huxton 2004-04-14 11:58:20 Re: cache lookup of relation 165058647 failed

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-04-14 12:44:50 Re: cache lookup of relation 165058647 failed
Previous Message Richard Huxton 2004-04-14 11:58:20 Re: cache lookup of relation 165058647 failed