Magnus Hagander wrote:
> > On Fri, Aug 25, 2017 at 12:12 AM, Antonin Houska wrote:
>
> I like this idea in general.
>
> Then it's supposed to change some of its attributes
>
> > adjust_log_stream_attr(&stream->filename, "my_extension.log");
>
> This, however, seems to be wrong.
>
> The l
Tomas Vondra wrote:
> On 08/28/2017 11:23 AM, Antonin Houska wrote:
> > Craig Ringer wrote:
> >
> >> On 25 August 2017 at 15:12, Antonin Houska wrote:
> >>
> >> How will this play with syslog? csvlog? etc?
> >
> > There's nothing special about csvlog: the LogStream structure has a
> > "destin
On Fri, Aug 25, 2017 at 12:12 AM, Antonin Houska wrote:
> Attached is a draft patch to allow extension to write log messages to a
> separate file. It introduces a concept of a "log stream". The extension's
> shared library gets its stream assigned by calling this function from
> _PG_init()
>
On 08/28/2017 11:23 AM, Antonin Houska wrote:
> Craig Ringer wrote:
>
>> On 25 August 2017 at 15:12, Antonin Houska wrote:
>>
>> How will this play with syslog? csvlog? etc?
>
> There's nothing special about csvlog: the LogStream structure has a
> "destination" field, so if particular extensi
Masahiko Sawada wrote:
> On Fri, Aug 25, 2017 at 4:12 PM, Antonin Houska wrote:
> > Attached is a draft patch to allow extension to write log messages to a
> > separate file.
>
> Does it allow postgres core code to write log messages to multiple log
> files as well? I can imagine a use case whe
On Fri, Aug 25, 2017 at 4:12 PM, Antonin Houska wrote:
> Attached is a draft patch to allow extension to write log messages to a
> separate file.
Does it allow postgres core code to write log messages to multiple log
files as well? I can imagine a use case where we want to write log
messages to s
Craig Ringer wrote:
> On 25 August 2017 at 15:12, Antonin Houska wrote:
>
> How will this play with syslog? csvlog? etc?
There's nothing special about csvlog: the LogStream structure has a
"destination" field, so if particular extension wants this kind of output, it
simply sets the LOG_DESTINA
On 25 August 2017 at 15:12, Antonin Houska 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 appropriat
Attached is a draft patch to allow extension to write log messages to a
separate file. It introduces a concept of a "log stream". The extension's
shared library gets its stream assigned by calling this function from
_PG_init()
my_stream_id = get_log_stream("my_extension", &my_log_stream);