Skip site navigation (1) Skip section navigation (2)

Re: Moving a table to another directory

From: "Jaime Casanova" <systemguards(at)gmail(dot)com>
To: "Ezequiel Luis Pellettieri" <ezequiel(dot)pellettieri(at)gmail(dot)com>
Cc: "Milen A(dot) Radev" <milen(at)radev(dot)net>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Moving a table to another directory
Date: 2007-02-06 03:03:47
Message-ID: c2d9e70e0702051903pf281bbdnf9a135902fa62a42@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
> 2007/2/5, Milen A. Radev <milen(at)radev(dot)net>:
> > Ezequiel Luis Pellettieri написа:
> > > Hi guys I have a big table (25 gb) and a need to move it to another
> > > directory cos i'm out of space.
> > > making a symlik will be ok? or I have to do something else
> > >
> >
> >
> > 1. CREATE TABLESPACE xxx LOCATION 'another_dir'
> > (
> http://www.postgresql.org/docs/current/static/sql-createtablespace.html);
> >
> > 2. ALTER TABLE big_table SET TABLESPACE xxx;
> >
> (http://www.postgresql.org/docs/current/static/sql-altertable.html
> )
> >
On 2/5/07, Ezequiel Luis Pellettieri <ezequiel(dot)pellettieri(at)gmail(dot)com> wrote:
> Thanks Milen, does it work on 7.4??
>

oops... your symlink will be ok... use the contrib oid2name to
identify the files corresponding to that table... and maybe the
indexes as well...

what i remember from the ancient era pre-tablespace (2 or 3 years ago)
is that a pg_dump and/or reindex will return all to it's original
state...

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook

In response to

Responses

pgsql-admin by date

Next:From: Ezequiel Luis PellettieriDate: 2007-02-06 03:28:42
Subject: Re: Moving a table to another directory
Previous:From: Ezequiel Luis PellettieriDate: 2007-02-06 02:26:03
Subject: Re: Moving a table to another directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group