Re: Bug fix confirmation: could not open relation with OID nnn

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aryeh Leib Taurog <vim(at)aryehleib(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug fix confirmation: could not open relation with OID nnn
Date: 2014-07-30 17:48:43
Message-ID: 20140730174843.GJ2791@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jul 10, 2014 at 02:21:57PM +0300, Aryeh Leib Taurog wrote:
> I'd like to do the following for large frequent updates on central
> table with ~1m rows:
>
> 1. Create new table like original
> 2. Populate new table
> 3. DROP original table
> 4. RENAME new table to original
>
> Some testing revealed that in pg 8.4 and 9.1, if another session
> queries the table between 3 and 4, the query fails with error 'could
> not open relation with OID nnn.' In pg 9.3 there's no error.
> <https://gist.github.com/altaurog/ab0019837719d2a93e6b>
>
> This seems to be the topic of conversation here:
> <http://www.postgresql.org/message-id/flat/12791(dot)1310599941(at)sss(dot)pgh(dot)pa(dot)us#12791(dot)1310599941@sss.pgh.pa.us>
> <http://www.postgresql.org/message-id/flat/20285(dot)1340769074(at)sss(dot)pgh(dot)pa(dot)us#20285(dot)1340769074@sss.pgh.pa.us>
>
> Do I correctly infer that the change in behavior was an intentional
> fix and that with pg >= 9.3 I can rely on the above method working
> without any risk of this error in my queries?

Yes, I think so.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2014-07-30 17:53:25 Re: BUG #10823: Better REINDEX syntax.
Previous Message Vik Fearing 2014-07-30 17:48:39 Re: BUG #10823: Better REINDEX syntax.