Re: ERROR: could not open relation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas F(dot) O'Connell" <tfo(at)sitening(dot)com>
Cc: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: could not open relation
Date: 2005-07-14 16:07:58
Message-ID: 20200.1121357278@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Thomas F. O'Connell" <tfo(at)sitening(dot)com> writes:
> Could this be related to temp tables?

Possibly, given that the table doesn't seem to be there anymore.

> Does bgwriter operate on temp tables, and could there exist an edge
> condition in which bgwriter might have scheduled a write to disk for
> a file corresponding to a temp table that was removed by sudden
> termination of the session in which the temp table existed such that
> the file was removed?

Do you have some evidence that the bgwriter was what was reporting the
error? You didn't say that before.

The bgwriter only works on dirty shared buffers, so the only way this
could be happening is if a page of a temp table had gotten loaded into
a shared buffer, which isn't supposed to happen really. Is it possible
that you had some backend deliberately trying to read a temp table
created by another backend? (You don't have to assume that the
interloper tried to modify the table; a mere SELECT could have created
the dirty-buffer condition due to hint-bit update. You do have to
assume that the interloper was superuser, though, else permissions
would have stopped him from accessing someone else's temp table.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2005-07-14 16:14:03 Re: ERROR: could not open relation
Previous Message Richard_D_Levine 2005-07-14 16:07:35 Re: Standalone Parser for PL/pgSQL