Re: Feature request: separate logging

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Feature request: separate logging
Дата
Msg-id CAB7nPqTu7PDmkJ-0-RuW=TWq6gGML2Tr+OT=9mvtHjrrucsycA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Feature request: separate logging  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
On Sun, Nov 20, 2016 at 12:56 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 18 nov. 2016 2:03 PM, "otheus uibk" <otheus.uibk@gmail.com> a écrit :
>> Finally, if these changes can be implemented, is it impossible to backport
>> them to prior versions, say 9.1 and up? If I wrote a patch, under what
>> conditions would the patch be accepted for inclusion in official releases of
>> older versions?
>>
>
> Only bug fixes are accepted in older releases. What you're proposing isn't a
> bug fix.

To put it in other words, if you are willing to write a patch that
would be accepted by upstream, the first version where it could land
is Postgres 10. Currently this version is still in development and the
last commit fest will be in March. See more details here:
https://wiki.postgresql.org/wiki/Submitting_a_Patch

If you are willing to get something done in older versions, it may be
interesting to look at the hook in elog.c and try to implement what
you are looking for as plugin loaded by the server at startup using
shared_preload_libraries. Reading roughly what you are writing above,
I guess that it could be possible: the elog hook offers ways to
redirect message strings generated by the server the way you want.

I wrote such a thing some time ago to generate logs with a JSON
format, you may want to look at that to give you more ideas:
https://github.com/michaelpq/pg_plugins/tree/master/jsonlog
--
Michael


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Strict min and max aggregate functions
Следующее
От: Subhankar Chattopadhyay
Дата:
Сообщение: pg_basebackup on slave running for a long time