Re: jsonlog logging only some messages? - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: jsonlog logging only some messages?
Date
Msg-id 20180228013149.GC1476@paquier.xyz
Whole thread Raw
In response to Re: jsonlog logging only some messages?  (Greg Stark <stark@mit.edu>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Online enabling of checksums
Next
From: Daniel Gustafsson
Date:
Subject: Re: compress method for spgist - 2