On Wed, Apr 18, 2018 at 02:59:26PM -0400, Robert Haas wrote:
> ====
> Note that logging_collector should be enabled in postgresql.conf to
> ensure consistent log outputs.  As JSON strings are longer than normal
> logs generated by PostgreSQL, this module increases the odds of malformed
> log entries.
> ====
> 
> I'm not sure I understand the issue, but I don't like malformed log entries.

If logging_collector is disabled, then all the log entries would just go
to stderr (that's mentioned in the docs).  While that may be fine for
low volumes of logs, for many concurrent processes generating logs then
a process can overwrite another process log entry.  The logs generated by
the JSON format are longer in length, increased mainly by the repetitive
use of the key names in the blob, which increase in turn the volume
generated.

So in this case this can cause JSON blobs to look broken.  I had a
report on github not long ago about that:
https://github.com/michaelpq/pg_plugins/issues/17
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to