From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org
To: gnanam@zoniac.com
Subject: Re: PSQLException: ERROR: could not open relation with OID xxxx
Date: Tue, 15 Mar 2011 10:48:42 -0500
Message-ID: <4D7F440A020000250003B8CD@gw.wicourts.gov> (raw)
In-Reply-To: <003601cbe2df$bf0c7480$3d255d80$@com>
References: <006d01cbdfd5$f48becb0$dda3c610$@com>
<4D7DEB6B020000250003B821@gw.wicourts.gov>
<003601cbe2df$bf0c7480$3d255d80$@com>
"Gnanakumar" <gnanam@zoniac.com> wrote:
>> If that doesn't do it I might try adding zero to numbers and
>> concatenating empty strings to try to prevent late use of the
>> OID. (Essentially as a form of optimization barrier.)
>
> I couldn't understand this approach clearly. Can you help explain
> me with some example?
For a string it would be changing something like this:
schemaname,
to something like this:
schemaname || '' AS schemaname,
for a number it might be changing:
pg_total_relation_size(schemaname||'.'||tablename)
to:
pg_total_relation_size(schemaname||'.'||tablename) + 0
Again, I would try without these first. If the problem persists I
would sprinkle these throughout the query. If the problem goes
away, I would probably selectively remove them until the problem
returned, so I would know where it matters.
-Kevin
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, gnanam@zoniac.com
Subject: Re: PSQLException: ERROR: could not open relation with OID xxxx
In-Reply-To: <4D7F440A020000250003B8CD@gw.wicourts.gov>
* 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