pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Move indexes
6+ messages / 6 participants
[nested] [flat]

* Move indexes
@ 2006-11-10 19:03  Alexander Burbello <alexander@cresoltec.com.br>
  0 siblings, 1 reply; 6+ messages in thread

From: Alexander Burbello @ 2006-11-10 19:03 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I have one tablespace with all my objects.
I would like to separate indexes from other.

How can I select and move with SQL???

Thank you for your help.



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Move indexes
@ 2006-11-13 10:17  Alexander Burbello <burbello3000@yahoo.com.br>
  0 siblings, 2 replies; 6+ messages in thread

From: Alexander Burbello @ 2006-11-13 10:17 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I have one tablespace with all my objects.
I would like to separate indexes from other.

How can I select and move with SQL???

Thank you for your help.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Move indexes
@ 2006-11-13 23:35  adey <adey11@gmail.com>
  parent: Alexander Burbello <burbello3000@yahoo.com.br>
  1 sibling, 0 replies; 6+ messages in thread

From: adey @ 2006-11-13 23:35 UTC (permalink / raw)
  To: Alexander Burbello <burbello3000@yahoo.com.br>; +Cc: pgsql-admin

Drop the index and recreate it in the new tablespace.

On 11/13/06, Alexander Burbello <burbello3000@yahoo.com.br> wrote:
>
> Hi,
>
> I have one tablespace with all my objects.
> I would like to separate indexes from other.
>
> How can I select and move with SQL???
>
> Thank you for your help.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                http://www.postgresql.org/about/donate
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Move indexes
@ 2006-11-14 06:22  Hakan Kocaman <Hakan.Kocaman@digame.de>
  parent: Alexander Burbello <alexander@cresoltec.com.br>
  0 siblings, 1 reply; 6+ messages in thread

From: Hakan Kocaman @ 2006-11-14 06:22 UTC (permalink / raw)
  To: Alexander Burbello <alexander@cresoltec.com.br>; pgsql-admin

Hi,

in short terms:

CREATE TABLESPACE
http://www.postgresql.org/docs/8.1/interactive/sql-createtablespace.html
CREATE TABLESPACE tablespace_name [ OWNER username ] LOCATION
'directory'

ALTER INDEX
http://www.postgresql.org/docs/8.1/interactive/sql-alterindex.html
ALTER INDEX name SET TABLESPACE tablespace_name

Haven't tried this for my own, so take care (and test).

Best regards

Hakan 



> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org 
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of 
> Alexander Burbello
> Sent: Friday, November 10, 2006 8:03 PM
> To: Lista Postgres
> Subject: [ADMIN] Move indexes
> 
> 
> Hi,
> 
> I have one tablespace with all my objects.
> I would like to separate indexes from other.
> 
> How can I select and move with SQL???
> 
> Thank you for your help.
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org 
> so that your
>        message can get through to the mailing list cleanly
> 



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Move indexes
@ 2006-11-14 21:48  Simon Riggs <simon@2ndquadrant.com>
  parent: Alexander Burbello <burbello3000@yahoo.com.br>
  1 sibling, 0 replies; 6+ messages in thread

From: Simon Riggs @ 2006-11-14 21:48 UTC (permalink / raw)
  To: Alexander Burbello <burbello3000@yahoo.com.br>; +Cc: pgsql-admin

On Mon, 2006-11-13 at 08:17 -0200, Alexander Burbello wrote:

> I have one tablespace with all my objects.
> I would like to separate indexes from other.
> 
> How can I select and move with SQL???
> 
> Thank you for your help.

ALTER INDEX name SET TABLESPACE tablespace_name

is the approved way and quicker than re-creating the indexes.

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Move indexes
@ 2006-11-15 00:21  Jaime Casanova <systemguards@gmail.com>
  parent: Hakan Kocaman <Hakan.Kocaman@digame.de>
  0 siblings, 0 replies; 6+ messages in thread

From: Jaime Casanova @ 2006-11-15 00:21 UTC (permalink / raw)
  To: Hakan Kocaman <Hakan.Kocaman@digame.de>; +Cc: Alexander Burbello <alexander@cresoltec.com.br>; pgsql-admin

On 11/14/06, Hakan Kocaman <Hakan.Kocaman@digame.de> wrote:
> Hi,
>
> in short terms:
>
> CREATE TABLESPACE
> http://www.postgresql.org/docs/8.1/interactive/sql-createtablespace.html
> CREATE TABLESPACE tablespace_name [ OWNER username ] LOCATION
> 'directory'
>
> ALTER INDEX
> http://www.postgresql.org/docs/8.1/interactive/sql-alterindex.html
> ALTER INDEX name SET TABLESPACE tablespace_name
>
> Haven't tried this for my own, so take care (and test).
>

i think we should add: "in >= 8.1"

-- 
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



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-11-15 00:21 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-11-10 19:03 Move indexes Alexander Burbello <alexander@cresoltec.com.br>
2006-11-14 06:22 ` Hakan Kocaman <Hakan.Kocaman@digame.de>
2006-11-15 00:21   ` Jaime Casanova <systemguards@gmail.com>
2006-11-13 10:17 Move indexes Alexander Burbello <burbello3000@yahoo.com.br>
2006-11-13 23:35 ` adey <adey11@gmail.com>
2006-11-14 21:48 ` Simon Riggs <simon@2ndquadrant.com>

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