Обсуждение: postgresql and syslog

От:
Ibrahim Harrani
Дата:

Hi,

I am using postgresql 8.3 with FreeBSD. FreeBSD is using syslog by
default for postgresql logs.
I would like to disable syslog in postgresql.conf. Does this change
increase the performance?
What is the impact of using syslog on postgresql performance?

Thanks.

От:
Robert Haas
Дата:

On Tue, Aug 4, 2009 at 5:16 PM, Ibrahim
Harrani<> wrote:
> Hi,
>
> I am using postgresql 8.3 with FreeBSD. FreeBSD is using syslog by
> default for postgresql logs.
> I would like to disable syslog in postgresql.conf. Does this change
> increase the performance?
> What is the impact of using syslog on postgresql performance?
>
> Thanks.

I suspect it wouldn't make much difference one way or the other, but I
suppose the thing to do is try it out and see.  If you come up with
any useful benchmarks, post 'em back here for the benefit of the next
person who asks...

...Robert

От:
Michael Nacos
Дата:

we have actually gone the opposite way and switched to using syslog
for logging purposes some time ago, with no performance issues.

syslog files are easily read by a lot of applications out there. We have
been using rsyslog for aggregating logs from multiple servers, splunk
for analysis purposes and pgfouine for routine reports.

I would be very surprised if logging had a significant overhead any method
you choose. there's probably something very wrong with your setup if this
is the case.

just another dimension, Michael


От:
Alvaro Herrera
Дата:

Michael Nacos escribió:

> I would be very surprised if logging had a significant overhead any method
> you choose. there's probably something very wrong with your setup if this
> is the case.

Either something very wrong, or the load is extremely high.  In the
latter case perhaps it would make sense to ship syslog to a remote
machine.  Since it uses UDP sockets, it wouldn't block when overloaded
but rather lose messages (besides, it means it has low overhead).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.