Unix Technical Forum

Re: BUG #1466: syslogger issues

This is a discussion on Re: BUG #1466: syslogger issues within the Pgsql Patches forums, part of the PostgreSQL category; --> Patch applied by Tom. Thanks. Backpatched to 8.0.X. --------------------------------------------------------------------------- Magnus Hagander wrote: > >>>>There is special code in the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 12:08 AM
Bruce Momjian
 
Posts: n/a
Default Re: BUG #1466: syslogger issues


Patch applied by Tom. Thanks.

Backpatched to 8.0.X.

---------------------------------------------------------------------------


Magnus Hagander wrote:
> >>>>There is special code in the send_message_to_server_log
> >>>
> >>>function to make
> >>>
> >>>>sure it's written directly to the file.
> >>>
> >>>If the logger is complaining, it's quite possibly because it's
> >>>unable to
> >>>write to its file. Now that you mention it, doesn't this

> >code go into
> >>>infinite recursion if write_syslogger_file_binary() tries to ereport?

> >
> >Yes, apparently.
> >
> >Actually, elog.c code should look like this:
> >
> >if ((Log_destination & LOG_DESTINATION_STDERR) ...)
> >{
> > if (am_syslogger)
> > write_syslogger_file(buf.data, buf.len);
> > else
> > fwrite(buf.data, 1, buf.len, stderr);
> >}
> >
> >This avoids unnecessary pipe traffic (which might fail too)
> >and gettext translation.

>
> That's sort of what I thought, but without being certain at all.
>
>
> >Next, the elog call in write_syslogger_file_binary will almost
> >certainly
> >loop, so it should call write_stderr then (since eventlog is usually
> >fixed-size with cyclic writing, even in out-of-disk-space conditions
> >something might get logged).

>
> Ok. I've included these changes in the attached patch. Haven't tested
> those specific codepaths, but the other changes still work...
>
> >3rd, I've been proposing to have redirect_stderr=true on by default at
> >least on win32 earlier, I still think this is reasonable.

>
> It's already the default if you install from the MSI installer.
>
> //Magnus


Content-Description: stderr.patch

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org


--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com