X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0872254421 for ; Sun, 6 Mar 2005 19:58:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51927-01 for ; Sun, 6 Mar 2005 19:58:19 +0000 (GMT) Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.250.190.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5478B54EAA for ; Sun, 6 Mar 2005 19:58:18 +0000 (GMT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id C208531DF8; Sun, 6 Mar 2005 20:58:18 +0100 (MET) From: Andrew - Supernews X-Newsgroups: pgsql.sql Subject: Re: Building a database from a flat file Date: Sun, 06 Mar 2005 19:58:17 -0000 Organization: http://www.supernews.com - all your nntp are belong to us Message-ID: References: <1109808921.12430.75.camel@boomerang.ran.sandia.gov> <42272D27.4030900@logix-tt.com> Reply-To: andrew@supernews.com User-Agent: slrn/0.9.8.0 (FreeBSD) X-Complaints-To: abuse@supernews.com Lines: 19 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/88 X-Sequence-Number: 20567 On 2005-03-03, Markus Schaber 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