Re: "No transaction in progress" warning

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
Cc: Conrad Lender <crlender(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: "No transaction in progress" warning
Date: 2009-05-07 16:26:54
Message-ID: 20115.1241713614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Mead <scott(dot)lists(at)enterprisedb(dot)com> writes:
> On Thu, May 7, 2009 at 11:29 AM, Conrad Lender <crlender(at)gmail(dot)com> wrote:
>> When I leave both log_directory and log_filename commented out (my
>> original settings), then restart postgres, it creates the file
>>
>> /var/log/postgresql/postgresql-8.3-main.log
>>
>> This contains three lines about SSL certificates, but the warning from
>> 'select 1/0' will instead be written to this file:
>>
>> /var/lib/postgresql/8.3/main/pg_log/postgresql-2009-05-07_170932.log
>>
>> So there are two log files :-|

> How did you restart postgres? I'm guessing that you're using a distribution
> provided package. If you're using the /etc/init.d scripts from that
> package, it's likely that the startup script is redirecting stderr and that
> the system is configured to use syslog for the rest of the logging.

Right. There are a number of messages that can appear at startup before
the postmaster reads and adopts the "where to log" settings in
postgresql.conf. Those early messages are going to go to postmaster's
stderr. What it sounds like is you're using a start script that points
postmaster stderr to /var/log/postgresql/postgresql-8.3-main.log.
I don't find that to be a tremendously good idea --- in my RPMs the
early-startup messages go to a fixed file (/var/lib/pgsql/pgstartup.log)
that's not dependent on what the "where to log" configuration settings
are.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marco Maccaferri 2009-05-07 16:30:34 Re: Postgres partially hang after inactivity
Previous Message Joshua D. Drake 2009-05-07 16:26:11 Re: PgUS 501c3 Public Charity