pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: raghavendra t <raagavendra.rao@gmail.com>
To: pgsql-general@postgresql.org
To: pgsql-performance@postgresql.org
Subject: ERROR: cache lookup failed for relation X
Date: Sat, 3 Apr 2010 22:08:11 +0530
Message-ID: <h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com> (raw)

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

view thread (5+ messages)  latest in thread

Message-ID: <h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com>
Permalink:  ../h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com/
Also on:    postgresql.org/message-id/h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: raagavendra.rao@gmail.com, pgsql-general@postgresql.org
  Subject: Re: ERROR: cache lookup failed for relation X
  In-Reply-To: <h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com>
  References: <h2xbc7de5a31004030938v82d1c243k27be011f9a681f76@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox