pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew - Supernews <andrew+nonews@supernews.com>
To: pgsql-sql@postgresql.org
Subject: Re: Building a database from a flat file
Date: Sun, 06 Mar 2005 19:58:17 -0000
Message-ID: <slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net> (raw)
References: <1109808921.12430.75.camel@boomerang.ran.sandia.gov>
	<42272D27.4030900@logix-tt.com>

On 2005-03-03, Markus Schaber <schabi@logix-tt.com> wrote:
> - Create the new date in another schema, and then simply rename those
> two schemas for "switch over"

This kind of thing looks superficially attractive but it has some serious
problems if you try and do it while there is other database activity.
Specifically, cached plans for functions and prepared statements will not
be invalidated by the rename, and will still refer to the old tables, so
you may have inconsistent results.

> - Have two different set of tables (maybe two identical schemas), and
> let your application work on a set of views. Then you can change the
> views via "create or replace view" for switch over.

Same problem applies here.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services



view thread (11+ messages)

Message-ID: <slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net>
Permalink:  ../slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net/
Also on:    postgresql.org/message-id/slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net

 · 

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-sql@postgresql.org
  Cc: andrew+nonews@supernews.com
  Subject: Re: Building a database from a flat file
  In-Reply-To: <slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net>

* 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