pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Aryeh Leib Taurog <vim@aryehleib.com>
To: pgsql-bugs@postgresql.org
Subject: Bug fix confirmation: could not open relation with OID nnn
Date: Thu, 10 Jul 2014 14:21:57 +0300
Message-ID: <20140710112157.GA6057@tiny> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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.1310599941@sss.pgh.pa.us#12791.1310599941@sss.pgh.pa...;
<http://www.postgresql.org/message-id/flat/20285.1340769074@sss.pgh.pa.us#20285.1340769074@sss.pgh.pa...;

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?

Much appreciated,
Aryeh Leib Taurog


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (2+ messages)  latest in thread

Message-ID: <20140710112157.GA6057@tiny>
Permalink:  ../20140710112157.GA6057@tiny/
Also on:    postgresql.org/message-id/20140710112157.GA6057@tiny

 · 

reply

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-bugs@postgresql.org
  Cc: vim@aryehleib.com
  Subject: Re: Bug fix confirmation: could not open relation with OID nnn
  In-Reply-To: <20140710112157.GA6057@tiny>
  References: <20140710112157.GA6057@tiny>

* 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