Re: [HACKERS] COPYable logs status

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] COPYable logs status
Date: 2007-06-12 23:38:53
Message-ID: 466F2E8D.4020808@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>> I'll try to get a patch out for just the stderr case, which should be
>> back-patchable, then adjust the CSVlog patch to use it.
>>
>
> Sounds like a plan.
>
>
>> I'm thinking of handling the partial lines with a small dynahash of
>> StringInfo buffers, which get discarded whenever we don't have a partial
>> line for the PID.
>>
>
> A hashtable might be overkill --- based on reports so far, it's unlikely
> you'd have more than two or three messages being received concurrently,
> so a simple list or array might be quicker to search.
>
>
>

Attached is a WIP patch ... I still have some debugging to do but I
think the basic logic is there. Comments welcome.

ATM it gets stuck in running installcheck and gdb shows the logger
hanging here:

enlargeStringInfo (str=0x9a91c8, needed=4085) at stringinfo.c:263
263 newlen = 2 * newlen;

Can I not use a StringInfo in the syslogger?

cheers

andrew

Attachment Content-Type Size
logpipe.patch text/x-patch 12.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-06-13 00:28:47 Re: [HACKERS] COPYable logs status
Previous Message Andrew Hammond 2007-06-12 23:18:17 Re: Selecting a constant question: A summary

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-06-13 00:28:47 Re: [HACKERS] COPYable logs status
Previous Message Satoshi Nagayasu 2007-06-12 23:31:31 Re: trace_checkpoint parameter patch