pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
postgresql.conf file and logging questions
3+ messages / 3 participants
[nested] [flat]

* postgresql.conf file and logging questions
@ 2004-03-28 01:32  admin@usachurch.com
  0 siblings, 2 replies; 3+ messages in thread

From: admin@usachurch.com @ 2004-03-28 01:32 UTC (permalink / raw)
  To: pgsql-admin

Hello list,

1.  Where should the postgresql.conf file be to be recognized by the 
service on startup?  currently, it is inside my $PGDATA directory but 
all of its contents are commented out.

2.  I can't find any log files for postgres.  Inside my /var/log/ 
directory, there is an empty
file called pgsql.  What do I have to do to get it to log errors, 
etc.  Is there a difference between normal logging and syslog logging?

Sorry for the newbie questions!

Thanks,
Devin



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

* Re: postgresql.conf file and logging questions
@ 2004-03-28 15:28  Tom Lane <tgl@sss.pgh.pa.us>
  parent: admin@usachurch.com
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-03-28 15:28 UTC (permalink / raw)
  To: admin@usachurch.com; +Cc: pgsql-admin

admin@usachurch.com writes:
> 1.  Where should the postgresql.conf file be to be recognized by the 
> service on startup?  currently, it is inside my $PGDATA directory but 
> all of its contents are commented out.

That's the correct file.  Uncomment anything you want to change.

> 2.  I can't find any log files for postgres.  Inside my /var/log/ 
> directory, there is an empty
> file called pgsql.  What do I have to do to get it to log errors, 
> etc.

If you want to use that file you could add "-l /var/log/pgsql" to the
pg_ctl start command in your PG startup script.

> Is there a difference between normal logging and syslog logging?

Yes, one goes to a file and the other to syslog ;-)

I'd recommend syslog on the whole, since you don't normally have to
worry about rotating logfiles when you use syslog.

			regards, tom lane



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

* Re: postgresql.conf file and logging questions
@ 2004-03-29 21:41  Lamar Owen <lowen@pari.edu>
  parent: admin@usachurch.com
  1 sibling, 0 replies; 3+ messages in thread

From: Lamar Owen @ 2004-03-29 21:41 UTC (permalink / raw)
  To: admin@usachurch.com; +Cc: pgsql-admin

On Saturday 27 March 2004 08:32 pm, admin@usachurch.com wrote:
> 1.  Where should the postgresql.conf file be to be recognized by the
> service on startup?  currently, it is inside my $PGDATA directory but
> all of its contents are commented out.

It is a template.  This is where the file should be located.

> 2.  I can't find any log files for postgres.  Inside my /var/log/
> directory, there is an empty
> file called pgsql.  What do I have to do to get it to log errors,
> etc.  Is there a difference between normal logging and syslog logging?

Please see the section on Logging (section 9) in README.rpm-dist, which is 
typically installed in /usr/share/doc/postgresql-version.  For example, for 
version 7.4.2, that is /usr/share/doc/postgresql-7.4.2.  The whole section 
is:
+++++++++++++++++++++++++++++++++++
LOGGING SET UP
-------------------------------------------------------------------------------
To get rollable syslog set up, see the documentation for the file
postgresql.conf, by default in the directory /var/lib/pgsql/data, as relates 
to
the syslog options.  Then, add a line to /etc/syslog.conf, using the man page
for syslog.conf as a source. Example:
If postgresql.conf has the following lines for the syslog settings:
syslog = 1 # range 0-2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'

Then you need to add the line to /etc/syslog.conf:
local0.*			/var/log/postgresql 

Then set up an entry in /etc/logrotate.d to roll postgresql the way you want 
it
rolled.
+++++++++++++++++++++++++++++++

Now, substitute /var/log/pgsql or whatever for the above file (hmmm, I wrote 
that section of the README.rpm-dist, but I though I had changed it to 
be /var/log/pgsql....).

There is other very useful information in README.rpm-dist; you really should 
read that file.
-- 
Lamar Owen
Director of Information Technology
Pisgah Astronomical Research Institute
1 PARI Drive
Rosman, NC  28772
(828)862-5554
www.pari.edu



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


end of thread, other threads:[~2004-03-29 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-28 01:32 postgresql.conf file and logging questions admin@usachurch.com
2004-03-28 15:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-03-29 21:41 ` Lamar Owen <lowen@pari.edu>

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