pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Crawford <scrawford@pinpointresearch.com>
To: Robert Treat <xzilla@users.sourceforge.net>
To: Eugene M. Zheganin <emz@norma.perm.ru>
Cc: pgsql-admin@postgresql.org
Subject: Re: Full vacuuming of BIG tables takes too long
Date: Thu, 22 May 2003 08:11:59 -0700
Message-ID: <200305220811.59291.scrawford@pinpointresearch.com> (raw)
In-Reply-To: <1053612118.2206.323.camel@camel>
References: <54953117843.20030522103956@norma.perm.ru>
	<94981743421.20030522183701@norma.perm.ru>
	<1053612118.2206.323.camel@camel>

You are likely to run into unhappy situations if you use views, rules, etc. 
Depending on the version of PG it will either refuse to drop the table if 
there are dependencies or it will drop it but the views won't be "connected" 
to the new version of t1 after you run your opreation.

Cheers,
Steve

On Thursday 22 May 2003 07:01, Robert Treat wrote:
> Is it possible for you do Begin;  Create Table t2 As Select * From t1;
> Drop Table t1 ; Alter table t2 Rename To t1; Commit;
>
> Note you might want to lock t1 from writers, but people could still
> select from it while you making the switch.
>
> Robert Treat




view thread (7+ messages)  latest in thread

Message-ID: <200305220811.59291.scrawford@pinpointresearch.com>
Permalink:  ../200305220811.59291.scrawford@pinpointresearch.com/
Also on:    postgresql.org/message-id/200305220811.59291.scrawford@pinpointresearch.com

 · 

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-admin@postgresql.org
  Cc: scrawford@pinpointresearch.com, xzilla@users.sourceforge.net, emz@norma.perm.ru
  Subject: Re: Full vacuuming of BIG tables takes too long
  In-Reply-To: <200305220811.59291.scrawford@pinpointresearch.com>
  References: <54953117843.20030522103956@norma.perm.ru> <94981743421.20030522183701@norma.perm.ru> <1053612118.2206.323.camel@camel> <200305220811.59291.scrawford@pinpointresearch.com>

* 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