Re: STDERR vs. SYSLOG logging

Lists: pgsql-admin
From: Kevin Kempter <kevin(at)kevinkempterllc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: STDERR vs. SYSLOG logging
Date: 2007-05-01 18:17:28
Message-ID: 200705011217.28585.kevin@kevinkempterllc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Hi List;

Anyone have any thoughts per which logging method (SYSLOG vs STDERR) is the
better approach ?

Thanks in advance...


From: "Spiegelberg, Greg" <gspiegelberg(at)isodxsolutions(dot)com>
To: "Kevin Kempter" <kevin(at)kevinkempterllc(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: STDERR vs. SYSLOG logging
Date: 2007-05-02 15:20:00
Message-ID: 82E74D266CB9B44390D3CCE44A781ED90B6B07@POSTOFFICE.cranel.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

Kevin Kempter sayeth...
>
> Hi List;
>
> Anyone have any thoughts per which logging method (SYSLOG vs
> STDERR) is the
> better approach ?
>

From looking at 8.2.1 source the internal postgres stderr redirect
method only does line buffering which explains why we see a performance
gain when we turn logging off or have it use syslog instead.

Syslog with the '-' option in front of the log file in syslog.conf is a
good option. As I understand it, ulog is also a good option but I
haven't any experience with it.

Logging when the individual log entry is buffered does present a risk of
losing a log entry on a system crash but for the purposes of Postgres I
would think that such a system crash would have been caused by something
external to Postgres and the loss of any logs in this case is okay.

Greg