Re: Building a database from a flat file - Mailing list pgsql-sql

From Andrew - Supernews
Subject Re: Building a database from a flat file
Date
Msg-id slrnd2mo6p.2quv.andrew+nonews@trinity.supernews.net
Whole thread Raw
In response to Building a database from a flat file  ("Casey T. Deccio" <ctdecci@sandia.gov>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: Postgres performance
Next
From: Stefan Weiss
Date:
Subject: Re: Links between rows in a table