Re: EXT :Re: Intermittent occurrence of ERROR: could not open relation

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: "Nykolyn, Andy (AS)" <andrew(dot)nykolyn(at)ngc(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: EXT :Re: Intermittent occurrence of ERROR: could not open relation
Date: 2012-01-31 18:16:16
Message-ID: 201201311016.16883.adrian.klaver@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday, January 31, 2012 9:42:07 am Nykolyn, Andy (AS) wrote:

>
> Some questions first:
> 1) What language are you using in the stored procedures?
> The stored procedures are in Pl/Pgsql

Temp table in PL/pgSQL was improved in 8.3 to handle this case, so you should be
covered.

http://www.postgresql.org/docs/8.4/interactive/release-8-3.html

"
Automatically re-plan cached queries when table definitions change or statistics
are updated (Tom)

Previously PL/pgSQL functions that referenced temporary tables would fail if the
temporary table was dropped and recreated between function invocations, unless
EXECUTE was used. This improvement fixes that problem and many related issues.
"
>
> 2) How are the temp tables being created? For instance is there an ON
> COMMIT DROP clause?
> They are created at the start of stored procedure and dropped at the end.
> There is no ON COMMIT DROP clause.

Are you using EXECUTE or doing a straight CREATE TEMP TABLE ...?
Maybe a sample with sensitive info changed?
The insert you mention happens in the same procedure or is there a nested
procedure?

>
> 3) How are the stored procedures being called?
> They are usually called from a java client but I have also seen this issue
> when called from a PgAdmin session screen.

Is there a database pooler in the mix?
Are there any other errors in the logs at the same time that might pertain?

>
> > Andy Nykolyn
> > Northrop Grumman

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nykolyn, Andy (AS) 2012-01-31 19:02:56 Re: EXT :Re: Intermittent occurrence of ERROR: could not open relation
Previous Message Little, Douglas 2012-01-31 18:12:46 normalizing & join to table function