Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5406C63415E; Sat, 3 Apr 2010 13:38:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 63043-07; Sat, 3 Apr 2010 16:38:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pv0-f174.google.com (mail-pv0-f174.google.com [74.125.83.174]) by mail.postgresql.org (Postfix) with ESMTP id 31EF26340A5; Sat, 3 Apr 2010 13:38:13 -0300 (ADT) Received: by pva18 with SMTP id 18so1224612pva.19 for ; Sat, 03 Apr 2010 09:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=u0bVmL57z4CUo+2s3G3F4fiKbY4SPc+XEjvnV2ukZbA=; b=FWiDB4crnuD2aDAcTSoFq9glBufmyfVOPniHnbKBYDKLXKrsqvGI2cBCepLcsl5Ts4 CudNJus0zWRygR0ouXQRLrUFWvVP2WqVeGACKB/Ph61ZmoJ9vu4G/9S+LgAB5oD2Srvb qj6OM4wm7FpqpdJb+2lvB/5ULmBnFQl0z2rNE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mypJKizuvk4akxQNpuikPD1yJ9L+3RYUGj+9eHjujSK4a+p8GgOkAV0KSuuiVelFpU UlSqO3h3vNPbKPFgFo15regX8FvESHW5y9DDNshGw/oE5UOhsEKnL4GqVKCFVtLsdNcX kYUfVLvhnEL59IxZ+DKXbt11ByDP83+zpstyA= MIME-Version: 1.0 Received: by 10.140.178.4 with HTTP; Sat, 3 Apr 2010 09:38:11 -0700 (PDT) Date: Sat, 3 Apr 2010 22:08:11 +0530 Received: by 10.140.248.8 with SMTP id v8mr2417501rvh.9.1270312691687; Sat, 03 Apr 2010 09:38:11 -0700 (PDT) Message-ID: Subject: ERROR: cache lookup failed for relation X From: raghavendra t To: pgsql-general@postgresql.org, pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd116babde470048357b83e X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.019 tagged_above=-10 required=5 tests=AWL=-0.835, BAYES_40=-0.185, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201004/139 X-Sequence-Number: 161337 --000e0cd116babde470048357b83e Content-Type: text/plain; charset=ISO-8859-1 Hi All, I am facing the error "cache lookup failed for relation X" in Postgres-8.4.2 version. As you all know, its a reproducable and below is the example. This can be generated with two sessions; Am opening two sessions here Session A and Session B Session A ========= step 1 - creating the table postgres=# create table cache(id integer); step 2 - Create the trigger and the function on particular table postgres=# CREATE FUNCTION cachefunc() RETURNS trigger AS $$ BEGIN RETURN NEW; END; $$ LANGUAGE plpgsql; postgres=# CREATE TRIGGER cachetrig BEFORE INSERT ON cache FOR EACH ROW EXECUTE PROCEDURE cachefunc(); Step 3 - Inserting a row in a table postgres=# insert into cache values (1); Step 4 - Droping the table in BEGIN block and issuing the same drop in another session B postgres=# begin; postgres=# drop table cache; step 5 - Open the second session B and issue the same command postgres=# drop table cache; --- In session B, this will wait untill commit is issued by the Session A. step 6 - Issue the commit in Session A postgres=# commit; Step -7 now we can the see the error in the session B ERROR: cache lookup failed for relation X Could plese tell me, why this is generated and what is the cause. Thanks in advance Regards Raghavendra --000e0cd116babde470048357b83e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi All,
=A0
I am facing the=A0error "cache lookup failed for relation X"= in Postgres-8.4.2 version. As you all know, its a reproducable and below i= s the example.
=A0
This can be generated with two sessions;
Am opening two sessions here Session A and Session B
Session A
=3D=3D=3D=3D=3D=3D=3D=3D=3D
step 1 - creating the tabl= e
=A0
postgres=3D# create table cache(id integer);

step 2 - Create the trigger and the function on particular table
=A0
postgres=3D# CREATE FUNCTION cachefunc() RETURNS trigger AS $$
=A0= =A0=A0 BEGIN
=A0=A0=A0 RETURN NEW;
=A0=A0=A0 END; $$ LANGUAGE plpgsql= ;
=A0
postgres=3D# CREATE TRIGGER cachetrig BEFORE INSERT ON cache FOR EACH = ROW EXECUTE PROCEDURE cachefunc();
=A0
Step 3 - Inserting a row in a table
=A0
postgres=3D# insert into cache values (1);
=A0
Step 4 - Droping the table in=A0BEGIN block and issuing the same drop = in another session B
=A0
postgres=3D# begin;
postgres=3D# drop table cache;
=A0
step 5 - Open the second session B and issue the same command
=A0
postgres=3D# drop table cache; --- In session B, this will wait untill= commit is issued by the Session A.
=A0
step 6 - Issue the commit in Session A
=A0
postgres=3D# commit;
=A0
Step -7 now=A0we can the see the error in the session B
=A0
ERROR: cache lookup failed for relation X

Could plese tell me, why this is generated and what is the cause.<= /div>
=A0
Thanks in advance
=A0
Regards
Raghavendra
--000e0cd116babde470048357b83e--