Re: Add jsonlog log_destination for JSON server logs

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add jsonlog log_destination for JSON server logs
Дата
Msg-id YTlunSciDRl1z7ik@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add jsonlog log_destination for JSON server logs  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Add jsonlog log_destination for JSON server logs  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Sep 08, 2021 at 08:46:44AM -0400, Andrew Dunstan wrote:
> Yeah. A very simple change would be to use two different values for json
> (say 'y' and 'n'). A slightly more principled scheme might use the top
> bit for the end marker and the bottom 3 bits for the dest type (so up to
> 8 types possible), with the rest available for future use.

I was thinking to track stderr as a case where no bits are set in the
flags for the area of the destinations, but that's a bit crazy if we
have a lot of margin in what can be stored.  I have looked at that and
finished with the attached which is an improvement IMO, especially
when it comes to the header validation.

FWIW, while looking at my own external module for the JSON logs, I
noticed that I used the chunk protocol when the log redirection is
enabled, but just enforced everything to be sent to stderr.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "houzj.fnst@fujitsu.com"
Дата:
Сообщение: RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: drop tablespace failed when location contains .. on win32