Re: jsonlog logging only some messages?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: jsonlog logging only some messages?
Date: 2018-02-28 01:31:49
Message-ID: 20180228013149.GC1476@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 27, 2018 at 04:50:24PM +0000, Greg Stark wrote:
> I would actually lean another way. If jsonlog opened *.json and wrote
> there then it could leave the output_to_server field unchanged. It
> does look like this might be a bit awkward with yet more of the static
> functions needing to be duplicated.

Which brings in why the chunked protocol that the syslogger uses is
useful, because by using a custom file you would either need to introduce
a global locking mechanism or to create a background worker that jsonlog
can feed its data to so as the log file does not finish with overlapping
writes. This bgworker which could use its own protocol or use the same
protocol as the syslogger, resulting in a sort of secondary syslogger
process. If you feel motivated to code anything like that, I'll be
happy to merge it in my tree with jsonlog :)
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2018-02-28 01:37:07 Re: compress method for spgist - 2
Previous Message Daniel Gustafsson 2018-02-28 01:22:44 Re: Online enabling of checksums