Re: PGOPTIONS and default_tablespace - Mailing list pgsql-admin

From Jan-Peter.Seifert@gmx.de
Subject Re: PGOPTIONS and default_tablespace
Date
Msg-id 20090114104440.310500@gmx.net
Whole thread Raw
In response to Re: PGOPTIONS and default_tablespace  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-admin
Hello Scott,

> Date: Mon, 12 Jan 2009 13:09:19 -0700
> From: "Scott Marlowe" <scott.marlowe@gmail.com>

> > without success I tried to set the default tablespace via the
> environment variable PGOPTIONS.
> >
> > My tries:
> > set PGOPTIONS="default_tablespace='pgdata'"
...

> I do this one of two ways usually.  Either I set the user / database
> to have a default tablespace permanently via alter user / database, or
> I put it at the top of my script I'm running.  PGOPTIONS isn't really
> the place I think of setting it myself.

The ALTER USER way works perfectly. Thanks a lot!

There's just one detail I'm not happy with.:
http://www.postgresql.org/docs/8.3/interactive/manage-ag-tablespaces.html

"If a database is created without specifying a tablespace for it, it uses the same tablespace as the template database
itis copied from." 

It would be really nice if the create db commands would follow the default_tablespace setting as well.

Thank you very much,

Peter Seifert

--
Sensationsangebot verlängert: GMX FreeDSL - Telefonanschluss + DSL
für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K1308T4569a

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb
Next
From: Kevin Kempter
Date:
Subject: query to find out # of buffer hits vs. # of disk reads ?