From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Joshua Tolley <eggyknap(at)gmail(dot)com>, jd <jd(at)commandprompt(dot)com>, Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: syslog_line_prefix |
Date: | 2009-09-28 20:07:03 |
Message-ID: | 13762.1254168423@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Alvaro Herrera wrote:
>> syslog uses a nonblocking file descriptor without a retry loop to
>> implement their logic. I see no reason we couldn't do that ourselves.
>> Mixing it with regular blocking code could turn out to be nontrivial,
>> but I don't think it's impossible.
> Well, for CSV logs it's a complete non-starter. We go to quite a deal of
> trouble to ensure we don't miss messages, because if we do the CSVs will
> be hopelessly corrupted.
You could make it work if write() had all-or-nothing semantics, so that
you could write or discard a whole logical message at once. But I don't
believe that's guaranteed for any interesting cases.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2009-09-28 20:23:12 | Re: [PATCH] DefaultACLs |
Previous Message | Stef Walter | 2009-09-28 20:04:26 | Re: pg_hba.conf: samehost and samenet [REVIEW] |