pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPGOPTIONS and default_tablespace
5+ messages / 3 participants
[nested] [flat]
* PGOPTIONS and default_tablespace
@ 2009-01-12 09:34 Jan-Peter.Seifert@gmx.de
2009-01-12 09:44 ` Re: PGOPTIONS and default_tablespace Thomas Markus <t.markus@proventis.net>
2009-01-12 20:09 ` Re: PGOPTIONS and default_tablespace Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Jan-Peter.Seifert@gmx.de @ 2009-01-12 09:34 UTC (permalink / raw)
To: pgsql-admin
Hello,
without success I tried to set the default tablespace via the environment variable PGOPTIONS.
My tries:
set PGOPTIONS="default_tablespace='pgdata'"
set PGOPTIONS=default_tablespace='pgdata'
set PGOPTIONS=default_tablespace(pgdata)
set PGOPTIONS=default_tablespace('pgdata')
When I try to connect to the server via psql I get the error message: "FATAL: invalid command-line arguments for server process. HINT: Try "postgres --help" for more information."
However, when I start the server with: postgres -c default_tablespace='pgdata'
it works.
What am I missing?
The OS is Windows xp Pro sp3. PostgreSQL version: 8.3.5.
BTW: Why aren't new databases created in the 'new' tablespace? Just because it's not a dbspace but a tablespace? It would be much more convenient if the createdb commands would make use of the default_tablespace setting as it's the case with tables.
Thank you very much,
Peter Seifert
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PGOPTIONS and default_tablespace
2009-01-12 09:34 PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
@ 2009-01-12 09:44 ` Thomas Markus <t.markus@proventis.net>
2009-01-12 16:53 ` Re: PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Markus @ 2009-01-12 09:44 UTC (permalink / raw)
To: Jan-Peter.Seifert@gmx.de; +Cc: pgsql-admin
hi,
try
set PGOPTIONS="-c default_tablespace='pgdata'"
regards
thomas
Jan-Peter.Seifert@gmx.de schrieb:
> Hello,
>
> without success I tried to set the default tablespace via the environment variable PGOPTIONS.
>
> My tries:
> set PGOPTIONS="default_tablespace='pgdata'"
> set PGOPTIONS=default_tablespace='pgdata'
> set PGOPTIONS=default_tablespace(pgdata)
> set PGOPTIONS=default_tablespace('pgdata')
>
>
Attachments:
t_markus.vcf (text/x-vcard, 253B) download
begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.markus@proventis.net
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PGOPTIONS and default_tablespace
2009-01-12 09:34 PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
2009-01-12 09:44 ` Re: PGOPTIONS and default_tablespace Thomas Markus <t.markus@proventis.net>
@ 2009-01-12 16:53 ` Jan-Peter.Seifert@gmx.de
0 siblings, 0 replies; 5+ messages in thread
From: Jan-Peter.Seifert@gmx.de @ 2009-01-12 16:53 UTC (permalink / raw)
To: Thomas Markus <t.markus@proventis.net>; +Cc: pgsql-admin
Hello Thomas,
thank you very much for your quick reply. However, this version doesn't work either - at least on Windows.
Peter
> try
>
> set PGOPTIONS="-c default_tablespace='pgdata'"
> > without success I tried to set the default tablespace via the
> environment variable PGOPTIONS.
> >
> > My tries:
> > set PGOPTIONS="default_tablespace='pgdata'"
> > set PGOPTIONS=default_tablespace='pgdata'
> > set PGOPTIONS=default_tablespace(pgdata)
> > set PGOPTIONS=default_tablespace('pgdata')
> >
> >
>
--
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PGOPTIONS and default_tablespace
2009-01-12 09:34 PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
@ 2009-01-12 20:09 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-01-14 10:44 ` Re: PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
1 sibling, 1 reply; 5+ messages in thread
From: Scott Marlowe @ 2009-01-12 20:09 UTC (permalink / raw)
To: Jan-Peter.Seifert@gmx.de; +Cc: pgsql-admin
On Mon, Jan 12, 2009 at 2:34 AM, <Jan-Peter.Seifert@gmx.de> wrote:
> Hello,
>
> without success I tried to set the default tablespace via the environment variable PGOPTIONS.
>
> My tries:
> set PGOPTIONS="default_tablespace='pgdata'"
> set PGOPTIONS=default_tablespace='pgdata'
> set PGOPTIONS=default_tablespace(pgdata)
> set PGOPTIONS=default_tablespace('pgdata')
>
> When I try to connect to the server via psql I get the error message: "FATAL: invalid command-line arguments for server process. HINT: Try "postgres --help" for more information."
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.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PGOPTIONS and default_tablespace
2009-01-12 09:34 PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
2009-01-12 20:09 ` Re: PGOPTIONS and default_tablespace Scott Marlowe <scott.marlowe@gmail.com>
@ 2009-01-14 10:44 ` Jan-Peter.Seifert@gmx.de
0 siblings, 0 replies; 5+ messages in thread
From: Jan-Peter.Seifert@gmx.de @ 2009-01-14 10:44 UTC (permalink / raw)
To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: 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 it is 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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2009-01-14 10:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-01-12 09:34 PGOPTIONS and default_tablespace Jan-Peter.Seifert@gmx.de
2009-01-12 09:44 ` Thomas Markus <t.markus@proventis.net>
2009-01-12 16:53 ` Jan-Peter.Seifert@gmx.de
2009-01-12 20:09 ` Scott Marlowe <scott.marlowe@gmail.com>
2009-01-14 10:44 ` Jan-Peter.Seifert@gmx.de
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