Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-28 Thread Peter Eisentraut
On Sat, 2009-09-26 at 15:35 -0600, Joshua Tolley wrote: > On Sat, Sep 26, 2009 at 11:43:46AM -0400, Tom Lane wrote: > > complete but more complex solution. (dup2 works on Windows, no?) > > Unless I'm misreading syslogger.c, dup2() gets called on every platform. > > I've started the wiki page in

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Andrew Dunstan
Joshua Tolley wrote: On Sat, Sep 26, 2009 at 11:43:46AM -0400, Tom Lane wrote: complete but more complex solution. (dup2 works on Windows, no?) Unless I'm misreading syslogger.c, dup2() gets called on every platform. Yes. Windows supports dup2(). See for example

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Joshua Tolley
On Sat, Sep 26, 2009 at 11:43:46AM -0400, Tom Lane wrote: > complete but more complex solution. (dup2 works on Windows, no?) Unless I'm misreading syslogger.c, dup2() gets called on every platform. I've started the wiki page in question: http://wiki.postgresql.org/wiki/Logging_Brainstorm It doe

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Tom Lane
Robert Haas writes: > On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: >> AIUI the problem is that when logging_collector is on, we throw away >> the original stderr.  That's OK as long as you never try to switch >> back to it. > BTW, this seems like it could be fixed with some appropriate fi

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Magnus Hagander
On Sat, Sep 26, 2009 at 17:43, Tom Lane wrote: > Robert Haas writes: >> On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: >>> AIUI the problem is that when logging_collector is on, we throw away >>> the original stderr.  That's OK as long as you never try to switch >>> back to it. > >> BTW, th

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-26 Thread Robert Haas
On Fri, Sep 25, 2009 at 5:22 PM, Robert Haas wrote: > AIUI the problem is that when logging_collector is on, we throw away > the original stderr.  That's OK as long as you never try to switch > back to it. BTW, this seems like it could be fixed with some appropriate file descriptor management in

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Robert Haas
On Fri, Sep 25, 2009 at 4:29 PM, Magnus Hagander wrote: > On Fri, Sep 25, 2009 at 22:26, Robert Haas wrote: >> On Fri, Sep 25, 2009 at 4:13 PM, Magnus Hagander wrote: >>> On Fri, Sep 25, 2009 at 05:18, Robert Haas wrote: On Mon, Sep 14, 2009 at 4:14 PM, Tom Lane wrote: > Magnus Hagand

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Tom Lane
[ argh, hit send a bit too fast ] Magnus Hagander writes: > Also, how often does it actually happen that "random libraries linked > into the backend emit messages on stderr"? Is this really something > that we need to pay so much attention to, rather than just let them go > on stderr and have the

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Tom Lane
Magnus Hagander writes: > Well, from how I read the first complaint here, running with > logging_collector on is simply broken from the crash perspective, no? > I mean, don't we have the same problem *today*, No, we don't. But we would if we accept the proposed patch. re

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Alvaro Herrera
Robert Haas escribió: > $ With that, it's no longer necessary to restart your server just to > $ reconfigure the logging, and it also takes away a confusing parameter > $ (really "log_destination=stderr, logging_collector=on" is *not* a logical > $ way to say "log to file"). Instead, it adds a log

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Magnus Hagander
On Fri, Sep 25, 2009 at 22:26, Robert Haas wrote: > On Fri, Sep 25, 2009 at 4:13 PM, Magnus Hagander wrote: >> On Fri, Sep 25, 2009 at 05:18, Robert Haas wrote: >>> On Mon, Sep 14, 2009 at 4:14 PM, Tom Lane wrote: Magnus Hagander writes: > First, the patch removes the logging_collecto

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Robert Haas
On Fri, Sep 25, 2009 at 4:13 PM, Magnus Hagander wrote: > On Fri, Sep 25, 2009 at 05:18, Robert Haas wrote: >> On Mon, Sep 14, 2009 at 4:14 PM, Tom Lane wrote: >>> Magnus Hagander writes: First, the patch removes the logging_collector parameter and basically assumes that logging_colle

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-25 Thread Magnus Hagander
On Fri, Sep 25, 2009 at 05:18, Robert Haas wrote: > On Mon, Sep 14, 2009 at 4:14 PM, Tom Lane wrote: >> Magnus Hagander writes: >>> First, the patch removes the logging_collector parameter and basically >>> assumes that logging_collector is always on. >> >> I don't find that to be a good idea, a

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-24 Thread Robert Haas
On Mon, Sep 14, 2009 at 4:14 PM, Tom Lane wrote: > Magnus Hagander writes: >> First, the patch removes the logging_collector parameter and basically >> assumes that logging_collector is always on. > > I don't find that to be a good idea, and you certainly have not made > a case why we should chan

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Itagaki Takahiro
Magnus Hagander wrote: > On 15 sep 2009, at 07.21, Itagaki Takahiro > I'd like to have an opposite approach -- per-backend log files. > > I can see each backend writing it, certainly, but keeping it in > separate files makes it useless without post processing, which in most > vases means u

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Magnus Hagander
On 15 sep 2009, at 07.21, Itagaki Takahiro > wrote: Magnus Hagander wrote: Second, data transfer from the backends is now in the form of structured data, and the actual logging message is put together in the syslogger I'd like to have an opposite approach -- per-backend log files. Syslo

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Itagaki Takahiro
Magnus Hagander wrote: > Second, data transfer from the backends is now in the form of > structured data, and the actual logging message is put together in the > syslogger I'd like to have an opposite approach -- per-backend log files. Syslogger and appending logs at only one file will be a per

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Tom Lane
Magnus Hagander writes: > First, the patch removes the logging_collector parameter and basically > assumes that logging_collector is always on. I don't find that to be a good idea, and you certainly have not made a case why we should change it. I can't see any reason why pushing functionality ou

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Magnus Hagander
On Mon, Sep 14, 2009 at 21:56, Guillaume Smet wrote: > Hi Magnus, > > On Mon, Sep 14, 2009 at 9:41 PM, Magnus Hagander wrote: >> First, the patch removes the logging_collector parameter and basically >> assumes that logging_collector is always on. > > Alvaro commited this a few days ago: > http:/

Re: [HACKERS] WIP - syslogger infrastructure changes

2009-09-14 Thread Guillaume Smet
Hi Magnus, On Mon, Sep 14, 2009 at 9:41 PM, Magnus Hagander wrote: > First, the patch removes the logging_collector parameter and basically > assumes that logging_collector is always on. Alvaro commited this a few days ago: http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?