From: | Scott Mead <scottm(at)openscg(dot)com> |
---|---|
To: | Korry Douglas <korry(dot)douglas(at)enterprisedb(dot)com> |
Cc: | Don Seiler <don(at)seiler(dot)us>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Logging: stderr vs syslog? |
Date: | 2017-08-04 18:02:03 |
Message-ID: | CAKq0gv+yBsSd3R0NcpDJV7EK-3-xkxoEFyaivjpLXwsHn+_YNw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Fri, Aug 4, 2017 at 1:40 PM, Korry Douglas <
korry(dot)douglas(at)enterprisedb(dot)com> wrote:
> Just an FYI - Scott is indeed a respected postgresql veteran, but he's
> hardly grizzled :-)
>
That just depends on who you talk to :-)
>
> -- Korry
>
> On Fri, Aug 4, 2017 at 1:11 PM, Scott Mead <scottm(at)openscg(dot)com> wrote:
>
>>
>>
>> On Fri, Aug 4, 2017 at 12:26 PM, Don Seiler <don(at)seiler(dot)us> wrote:
>>
>>> I've just inherited a few PostgreSQL DBs, having come from Oracle land.
>>> I'm looking to shore up the logging situation. Right now we use stderr
>>> logging and they get rotated based on size threshold. I'd like for those
>>> old logs to be gzipped so we can keep more on disk rather than current
>>> method of just deleting old logs to free up space. This is mostly on pgsql
>>> 9.2 with a couple of 9.3, but I'm planning to upgrade everything to 9.6.3
>>> when I get my feet on solid ground.
>>>
>>> Couple of question around this:
>>>
>>> 1. I thought logrotate would be a no-brainer here, but it sounds
>>> like I should then change to use syslog rather than stderr. I've read some
>>> caveats around syslog needing to sync files and potentially slow things
>>> down. I'm wondering if any grizzled production postgres veterans could
>>> offer up their experience.
>>> 2. Alternatively I could just keep it going with stderr and have a
>>> separate script run find/gzip on log files beyond a certain mtime
>>> threshold. This would probably be the quickest to implement, but I'd much
>>> rather use logrotate facilities if there are no strong opinions against
>>> using syslog.
>>>
>>>
>> Personally, I'm a huge fan of syslog + logrotate. Since you're new to
>> PG, you should have a look at pgBadger (https://github.com/dalibo/pgb
>> adger) to parse / analyze / summarize the logs for you. You *may* need
>> to set an appropriate log_line_prefix, but, there's a few examples in the
>> pgBadger docs.
>>
>> --Scott
>>
>>
>>
>>> Thanks in advance for your time, I'm sure I'll be making a lot of us of
>>> these mailing lists in the not-too-distant future.
>>>
>>> Don.
>>>
>>> --
>>> Don Seiler
>>> www.seiler.us
>>>
>>
>>
>>
>> --
>> --
>> Scott Mead
>> Sr. Architect
>> *OpenSCG <http://openscg.com>*
>> http://openscg.com
>>
>
>
--
--
Scott Mead
Sr. Architect
*OpenSCG <http://openscg.com>*
http://openscg.com
From | Date | Subject | |
---|---|---|---|
Next Message | Evan Rempel | 2017-08-04 19:49:32 | Re: Logging: stderr vs syslog? |
Previous Message | Korry Douglas | 2017-08-04 17:40:45 | Re: Logging: stderr vs syslog? |