From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Brusselback <adambrusselback@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: Possible bug: could not open relation with OID [numbers] SQL State: XX000
Date: Wed, 01 Nov 2017 21:36:35 -0400
Message-ID: <13901.1509586595@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMjNa7eLii9EcuPERJoGGvUw7q+MDHd9B4SCNpXkf14662e+Tw@mail.gmail.com>
References: <CAMjNa7ckR8BAsW2Lu3VUSzTqY5SH0dprZU5=NH_nsHaJ_ynJ-g@mail.gmail.com>
<20171101220354.GB22239@telsasoft.com>
<CAMjNa7dkMbYVF0JPMMQ7WpT=4mFTBaJwwt5nSP0BCBb9bbwDTg@mail.gmail.com>
<CAMjNa7eLii9EcuPERJoGGvUw7q+MDHd9B4SCNpXkf14662e+Tw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Adam Brusselback <adambrusselback@gmail.com> writes:
> The OID does not match any of the temp tables, so not sure what's up there.
> I have the function RETURN QUERY,
> and then I drop all my temp tables.
I'll bet the OID corresponds to the toast table for one of those temp
tables. RETURN QUERY will stash away all the values read by the query,
but it doesn't make an attempt to inline out-of-line values; so you get
a failure when the out-of-line column value is eventually demanded.
I think we've seen one previous complaint of the same ilk. Probably
somebody will get annoyed enough to fix it at some point, but the
sticking point is how to cover this corner case without causing a
performance drop for normal cases. In the meantime, maybe you could
make the temp tables be ON COMMIT DROP instead of dropping them
explicitly mid-transaction.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, adambrusselback@gmail.com, pryzby@telsasoft.com
Subject: Re: Possible bug: could not open relation with OID [numbers] SQL State: XX000
In-Reply-To: <13901.1509586595@sss.pgh.pa.us>
References: <CAMjNa7ckR8BAsW2Lu3VUSzTqY5SH0dprZU5=NH_nsHaJ_ynJ-g@mail.gmail.com> <20171101220354.GB22239@telsasoft.com> <CAMjNa7dkMbYVF0JPMMQ7WpT=4mFTBaJwwt5nSP0BCBb9bbwDTg@mail.gmail.com> <CAMjNa7eLii9EcuPERJoGGvUw7q+MDHd9B4SCNpXkf14662e+Tw@mail.gmail.com> <13901.1509586595@sss.pgh.pa.us>
* 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