Re: rebuilding a table from a datafile - Mailing list pgsql-general

From brianb-pggeneral@edsamail.com
Subject Re: rebuilding a table from a datafile
Date
Msg-id 20000819155321.3163.qmail@mail01.edsamail.com.ph
Whole thread Raw
In response to Re: rebuilding a table from a datafile  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane writes:
> brianb-pggeneral@edsamail.com writes:
> > This is with regards to Postgres 6.5.
> > While trying to ALTER RENAME a large table (203MB data file), an error
> > occured.
>
> Table RENAME is pretty risky under 6.5 :-(.  7.0 is a little better,
> but RENAME will never be trustworthy until we abandon the linkage
> between file names and table names.

This is the tablespaces feature, right? Is there any news on when Postgres
will support this?

> You could probably get away with
>
>     CREATE TABLE someothername (same parameters)
>
> and then rm the (presumably 0-size) file 'someothername' and copy the
> original-table-named file to that file name.  This will not fill the
> indexes, if any, on the new table, so drop and recreate them afterwards.

Yep, I got away with it alright. I can see my data now.

> After that, update to 7.0.2 ;-)

Will do! Thanks Tom!

Brian
--
Brian Baquiran <brianb@edsamail.com>
http://www.baquiran.com/  AIM: bbaquiran
Work: +63(2)7182222       Home: +63(2) 9227123

I'm smarter than average. Therefore, average, to me, seems kind of stupid.
People weren't purposely being stupid. It just came naturally.
                              -- Bruce "Tog" Toganazzini

pgsql-general by date:

Previous
From: Ned Lilly
Date:
Subject: Re: AS3AP Implementation for PostgreSQL/Linux ?
Next
From: Simon Brooke
Date:
Subject: Re: Linking legacy PHP stuff