Re: Proposal: Adding json logging

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Arnold <dar(at)xoe(dot)solutions>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Proposal: Adding json logging
Date: 2018-04-14 03:24:37
Message-ID: 20180414032437.GC27295@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 14, 2018 at 12:00:16AM +0000, David Arnold wrote:
> I'm new here. I'm David and would describe myself as an ambitious newbie,
> so please take my suggestion with a grain of salt.

Welcome here.

> I asked Michael Paquier about his solution:
> https://github.com/michaelpq/pg_plugins/tree/master/jsonlog
> He was suggestion to take action and propose this extension again to be
> included in contrib:
> https://github.com/michaelpq/pg_plugins/issues/24
>
> He mentioned the argument was rised of taking too much place.
> This is true under the paradigm that logs are consumed by TTY or grep,
> however, if those logs are to be stored in a logging solution, this is not
> really of concern.

Here are the exact same words I used on this github thread to avoid
confusion:
"I proposed that a couple of years back, to be rejected as the key names
are too much repetitive and take too much place. I have personally plans
to work on other things, so if anybody wishes to take this code and send
a proposal upstream, feel free to! The code is under PostgreSQL license
and I am fine if a patch is proposed even with this code taken."

I am not sure that the concerns expressed back on community-side have
changed. I cannot put back my finger on the -hackers thread where this
has been discussed by the way, the extra log volume caused by repetitive
key names was one.

> Please let me know if you need more context on my use case.
>
> That beeing said the proposal is to accept this library into postgres
> contrib.
>
> Please let me know, if I should prepare a patch.

It is better to gather opinions before delivering a patch. If there is
consensus that people would like to have an in-core option to allow logs
in json format, for which I am sure that folks would *not* want a
contrib/ plugin but something as an extension of log_destination, then
of course you could move ahead and propose a patch. Of course feel free
to reuse any code in my module if that helps! It is released under
PostgreSQL license as well.

Please note two things though:
- Patch submission follows a particular flow, be sure to read those
notes:
https://wiki.postgresql.org/wiki/Submitting_a_Patch
- Once you have a patch, you need to send it to a commit fest, for which
the next one will likely be next September (precise schedule will be
finalized at the end of May at PGCon) for the beginning of development
of Postgres 12. The development of Postgres 11 has just finished, so
the focus is to stabilize the release first, which consists in testing
and double-checking that everything which has been merged is stable. So
please do not expect immediate feedback on any patch you send.

Thanks,
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Юрий Соколов 2018-04-14 07:09:19 Re: Postgres stucks in deadlock detection
Previous Message David Arnold 2018-04-14 00:00:16 Proposal: Adding json logging