Re: [HACKERS] WIP: Separate log file for extension - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: [HACKERS] WIP: Separate log file for extension
Date
Msg-id CAMsr+YHxcK3FnB_3oQVrD+3gy=yuBij7oO2Nhfg2QnmyNwvwdg@mail.gmail.com
Whole thread Raw
In response to [HACKERS] WIP: Separate log file for extension  (Antonin Houska <ah@cybertec.at>)
Responses Re: [HACKERS] WIP: Separate log file for extension
List pgsql-hackers
On 25 August 2017 at 15:12, Antonin Houska <ah@cybertec.at> wrote:
Attached is a draft patch to allow extension to write log messages to a
separate file.

I like the idea a lot. I'm not so sure about the approach.

How will this play with syslog? csvlog? etc?

I wonder if a level of indirection is appropriate here, where extensions (or postgres subsystems, even) provide a log stream label. Then the logging backed takes care of using that appropriately for the logging mechanism in use; for logging to file that'd generally be separate files.  Same for CSVlog. Other mechanisms could be left as stubs initially.

So the outcome would be the same, just without the assumption of specific file name and output mechanism baked in.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] pgbench: faster version of tpcb-like transaction
Next
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] pgbench: Skipping the creating primary keys after initialization