Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Peter Eisentraut

Justin Clift writes:

 Would it be beneficial for us to extend pg_config to update the
 postgresql.conf file?

That has nothing to do with pg_config's functions.

-- 
Peter Eisentraut   [EMAIL PROTECTED]


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Justin Clift

Peter Eisentraut wrote:
 
 Justin Clift writes:
 
  Would it be beneficial for us to extend pg_config to update the
  postgresql.conf file?
 
 That has nothing to do with pg_config's functions.

At present, sure.  Was thinking a tool for command line changes of
postgresql.conf parameters would be useful, then thought about what such
a tool would be named.  pg_cfg was a thought, as was pg_config.

However we already have a pg_config.  At present it's purpose is in the
realm of reporting the installation configuration of PostgreSQL.  Was
thinking that adding the ability to do more than report stuff, but
also to make changes isn't that bad an idea.

?

Regards and best wishes,

Justin Clift
 
 --
 Peter Eisentraut   [EMAIL PROTECTED]

-- 
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
   - Indira Gandhi

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Tom Lane

Justin Clift [EMAIL PROTECTED] writes:
 Would it be beneficial for us to extend pg_config to update the
 postgresql.conf file?

This seems far outside pg_config's charter.  It is a simple
information reporter that can be run by anybody.  Making it able
to mess with (or even look at) postgresql.conf introduces a host
of permissions problems and logistical issues.

I don't really see what's wrong with using a text editor anyway ;-)

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])



Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Alvaro Herrera

On Sun, 29 Sep 2002, Tom Lane wrote:

 Justin Clift [EMAIL PROTECTED] writes:
  Would it be beneficial for us to extend pg_config to update the
  postgresql.conf file?
 
 This seems far outside pg_config's charter.  It is a simple
 information reporter that can be run by anybody.  Making it able
 to mess with (or even look at) postgresql.conf introduces a host
 of permissions problems and logistical issues.
 
 I don't really see what's wrong with using a text editor anyway ;-)

Obviously he wants a tool that allows setting parameters from a shell
script or something for use within pg_autotune.  I don't see why it is
bad to have a tool to do this; if someone can use it (and modify
postgresql.conf) obviously he has permission to read (and write)
postgresql.conf.

-- 
Alvaro Herrera (alvherre[@]dcc.uchile.cl)
Hoy es el primer dia del resto de mi vida


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Joe Conway

Alvaro Herrera wrote:
 Obviously he wants a tool that allows setting parameters from a shell
 script or something for use within pg_autotune.  I don't see why it is
 bad to have a tool to do this; if someone can use it (and modify
 postgresql.conf) obviously he has permission to read (and write)
 postgresql.conf.
 

But, if that's the case, why not just:

1. send e.g. set sort_mem=8192 as an SQL statement for runtime changeable
parameters
2. use e.g. pg_ctl restart -D $PGDATA -o '--shared_buffers=1' for those
parameters requiring a restart


Joe




---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [HACKERS] pg_config : postgresql.conf adjustments?

2002-09-29 Thread Justin Clift

Joe Conway wrote:
 
 Alvaro Herrera wrote:
  Obviously he wants a tool that allows setting parameters from a shell
  script or something for use within pg_autotune.  I don't see why it is
  bad to have a tool to do this; if someone can use it (and modify
  postgresql.conf) obviously he has permission to read (and write)
  postgresql.conf.
 
 
 But, if that's the case, why not just:
 
 1. send e.g. set sort_mem=8192 as an SQL statement for runtime changeable
 parameters
 2. use e.g. pg_ctl restart -D $PGDATA -o '--shared_buffers=1' for those
 parameters requiring a restart

Doesn't allow for scriptable permanent changes, only runtime ones.  Was
just trying to think of a optimal end user solution.  Totally hadn't
thought of the 'set sort_mem=xxx' option either, but it might work for
the next version of pg_autotune (am going to have to re-write it
anyway).

:)

Regards and best wishes,

Justin Clift

 
 Joe

-- 
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
   - Indira Gandhi

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[HACKERS] pg_config : postgresql.conf adjustments?

2002-09-28 Thread Justin Clift

Hi all,

Would it be beneficial for us to extend pg_config to update the
postgresql.conf file?

i.e.

pg_config --sort_mem 16384 --shared_buffers 800

pg_config -d /some/datadir --sort_mem 16384 --shared_buffers 800

etc?

Not sure if it should trigger a restart of postmaster, etc, but the
concept sounds useful.

:-)

Regards and best wishes,

Justin Clift

-- 
My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
   - Indira Gandhi

---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org