Re: Bug #491: ERROR: RelationClearRelation: relation using JDBC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kornale(at)charlie(dot)cns(dot)iit(dot)edu
Cc: pgsql-bugs(at)postgreSQL(dot)org
Subject: Re: Bug #491: ERROR: RelationClearRelation: relation using JDBC
Date: 2001-10-25 16:53:52
Message-ID: 14600.1004028832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hmm. This seems to be a slightly different variant of the problem than
the one we fixed. You could avoid it by not letting your clients hold
open transactions while they're sitting idle. The path that's causing
a problem (or at least the problem I reproduced here) is

Backend 1 Backend 2

use table users;

commit; begin;

drop table users;

create new users table

use table users;

The problem is essentially that backend 1 is prepared to notice the
old users table having gone away when it does "begin", but not later
in its transaction. It's still trying to use its old cached relation
entry, which is for the now-deleted table.

This is a bug, agreed, but not one that I can easily back-patch a fix
for into 7.1.*.

Another possible workaround for you is to not drop and recreate the
users table. Couldn't you just truncate it?

regards, tom lane

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruno Wolff III 2001-10-25 20:30:11 Porting issue with openssl and no /dev/random
Previous Message Martin Würtele 2001-10-25 15:53:49 problems after server crash