From: | "Ezequiel Luis Pellettieri" <ezequiel(dot)pellettieri(at)gmail(dot)com> |
---|---|
To: | "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com> |
Cc: | "Jaime Casanova" <systemguards(at)gmail(dot)com>, "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-07 16:27:30 |
Message-ID: | 86aad3420702070827u78e38b7ch5749184de178299f@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
thanks guys, is it possible to go with it, without stopping the postmaster?
maybe just rejecting conns to the DB...
this is cos I had another DB's running...
thanks again.
pelle.-
2007/2/6, Scott Marlowe <smarlowe(at)g2switchworks(dot)com>:
>
> On Mon, 2007-02-05 at 21:03, Jaime Casanova wrote:
> > > 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...
>
> Note that you've also got the option of using initlocation. This only
> allows you to create entire databases on alternate storage location, not
> individual tables.
>
> If you DO go with symlinks, certain operations may result in losing the
> link and recreating the table in the local directory (i.e. anything that
> would change the OID assigned to that table, as I believe cluster and
> reindex would do)
>
> See
> http://www.postgresql.org/docs/7.4/static/app-initlocation.html
> and
> http://www.postgresql.org/docs/7.4/static/sql-createdatabase.html
>
> But my primary recommendation is to upgrade to AT LEAST 8.1 version of
> PostgreSQL. Now that 8.2.2 is out, I'd consider going to it. 7.4 is
> getting pretty long in the tooth by comparison.
>
--
Saludos cordiales. Ezequiel L. Pellettieri
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander B. | 2007-02-07 16:27:48 | tsearch feature |
Previous Message | Michael Monnerie | 2007-02-07 16:08:26 | Re: [RFC] mysql compatibility project |