Setting logfile location with pg_ctl and postgres.conf

Started by Frank Joerdensabout 25 years ago3 messagesgeneral
Jump to latest
#1Frank Joerdens
frank@joerdens.de

I am using beta3 and am setting my runtime options via
data/postgresql.conf, which works just fine:

log_connections = on
log_pid = true
log_timestamp = true
fsync = off
max_connections = 256
sort_mem = 8192
shared_buffers = 2048
tcpip_socket = on
unix_socket_directory = '/usr/db/pgsql/sockdir'

When starting with

/usr/db/pgsql/bin/pg_ctl -D /usr/db/pgsql/data

I don't see how you can set the log file to something like

/usr/db/pgsql/log/postgresql_db.log

From the docs you can see how to use the syslog facility via
postgresql.conf but it's not really obvious how you use both
the config file and pg_ctl with a logfile location like the above.

That I've only managed to do like:

/usr/db/pgsql/bin/postmaster -i -d 2 -B 2048 -N 256 -o '-F -S 8192'\

/usr/db/log/postgresql_db.log 2>&1 &

Is there a 'proper' way to accomplish this or do I simply create my own
startscript?

Regards, Frank

BTW: How do you see runtime options passed to the postmaster via the
config file? The command

pg_ctl status

only shows those options that were passed on
the command line.

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Frank Joerdens (#1)
Re: Setting logfile location with pg_ctl and postgres.conf

Frank Joerdens writes:

I don't see how you can set the log file to something like

/usr/db/pgsql/log/postgresql_db.log

That I've only managed to do like:

/usr/db/pgsql/bin/postmaster -i -d 2 -B 2048 -N 256 -o '-F -S 8192'\

/usr/db/log/postgresql_db.log 2>&1 &

This is how to do it.

BTW: How do you see runtime options passed to the postmaster via the
config file?

Look into the config file. If you're interested in a particular option,
use the SHOW command.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/

#3Frank Joerdens
frank@joerdens.de
In reply to: Peter Eisentraut (#2)
Re: Setting logfile location with pg_ctl and postgres.conf

On Sun, Jan 28, 2001 at 12:33:49AM +0100, Peter Eisentraut wrote:
[ . . . ]

BTW: How do you see runtime options passed to the postmaster via the
config file?

Look into the config file. If you're interested in a particular option,
use the SHOW command.

Cool.

Ta, Frank