X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4AC6BD1EACE for ; Mon, 29 Mar 2004 21:41:24 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 04473-01 for ; Mon, 29 Mar 2004 17:41:24 -0400 (AST) Received: from mail.pari.edu (mail.pari.edu [206.74.232.230]) by svr1.postgresql.org (Postfix) with ESMTP id 7EB89D1EAD3 for ; Mon, 29 Mar 2004 17:41:21 -0400 (AST) Received: from dhcp-pool125.pari.edu (dhcp-pool125.pari.edu [192.168.1.125]) by mail.pari.edu (8.11.6/8.11.6) with ESMTP id i2TLKNP17902; Mon, 29 Mar 2004 16:20:23 -0500 From: Lamar Owen Organization: Pisgah Astronomical Research Institute To: admin@usachurch.com Subject: Re: postgresql.conf file and logging questions Date: Mon, 29 Mar 2004 16:41:20 -0500 User-Agent: KMail/1.6.1 Cc: pgsql-admin@postgresql.org References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403291641.20129.lowen@pari.edu> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/377 X-Sequence-Number: 12946 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