pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Samuel Gendler <sgendler@ideasculptor.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: bulk load performance question
Date: Tue, 12 Oct 2010 17:22:14 -0400
Message-ID: <7139.1286918534@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTikC4KWPAo5w3kB8a62Hc=yR=ikJ3vn52qCSD9Ub@mail.gmail.com>
References: <AANLkTikC4KWPAo5w3kB8a62Hc=yR=ikJ3vn52qCSD9Ub@mail.gmail.com>

Samuel Gendler <sgendler@ideasculptor.com> writes:
> Is there some way to do the drop+rename in a manner which will preserve the
> OID or otherwise allow blocked queries to execute correctly once they
> unblock?

No, but you could consider 
	begin;
	truncate original_table;
	insert into original_table select * from new_data;
	commit;

> A secondary issue is that if permissions were granted to a role on the old
> table, the new table does not acquire those permissions and they must be
> granted again.

Not to mention foreign keys ...

			regards, tom lane



view thread (2+ messages)

Message-ID: <7139.1286918534@sss.pgh.pa.us>
Permalink:  ../7139.1286918534@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7139.1286918534@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sgendler@ideasculptor.com
  Subject: Re: bulk load performance question
  In-Reply-To: <7139.1286918534@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