Re: rebuilding a table from a datafile

From: brianb-pggeneral(at)edsamail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: rebuilding a table from a datafile
Date: 2000-08-19 15:53:19
Message-ID: 20000819155321.3163.qmail@mail01.edsamail.com.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom Lane writes:
> brianb-pggeneral(at)edsamail(dot)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(at)edsamail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Brooke 2000-08-19 17:16:31 Re: Linking legacy PHP stuff
Previous Message Ned Lilly 2000-08-19 13:55:26 Re: AS3AP Implementation for PostgreSQL/Linux ?