Thread: Suggestions

Suggestions

From
Michael Richards
Date:
Hi.
I have a suggestion. I would be interested in implementing it if ppl think
it is a good idea.

Why not have a default location where postgres writes its log files. The
current way of doing it seems to be a little klunky.
I have an either/or suggested fix.
a) add a switch to specify where the info and the errors files go,
/var/log/postgres/info and maybe /var/log/postgres/errors

b) write all the stuff to syslog

I like b better because it would allow remote logging. One could then use
the features of syslog to dump the stuff they want to know about to an
approprate log file. I believe this would also be more effective at making
sure messages get sent when the backend crashes. I have seen a few places
where the messages don't seem to get there because of buffering...

-Mike



Re: [HACKERS] Suggestions

From
The Hermit Hacker
Date:
On Sun, 3 May 1998, Michael Richards wrote:

>
> Hi.
> I have a suggestion. I would be interested in implementing it if ppl think
> it is a good idea.
>
> Why not have a default location where postgres writes its log files. The
> current way of doing it seems to be a little klunky.
> I have an either/or suggested fix.
> a) add a switch to specify where the info and the errors files go,
> /var/log/postgres/info and maybe /var/log/postgres/errors
>
> b) write all the stuff to syslog

    b) is the preferred way of doing it...it should just be a matter
of adding it to backend/utils/elog.c ...

Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org


Re: [HACKERS] Suggestions

From
dg@illustra.com (David Gould)
Date:
> On Sun, 3 May 1998, Michael Richards wrote:
> >
> > Hi.
> > I have a suggestion. I would be interested in implementing it if ppl think
> > it is a good idea.
> >
> > Why not have a default location where postgres writes its log files. The
> > current way of doing it seems to be a little klunky.
> > I have an either/or suggested fix.
> > a) add a switch to specify where the info and the errors files go,
> > /var/log/postgres/info and maybe /var/log/postgres/errors
> >
> > b) write all the stuff to syslog
>
>     b) is the preferred way of doing it...it should just be a matter
> of adding it to backend/utils/elog.c ...
>

One problem might be that postgres can write _a_ _lot_ of messages to
the log and I would not want to fill my /var/log partition with them as
this would interfere with other logging.

-dg

David Gould            dg@illustra.com           510.628.3783 or 510.305.9468
Informix Software  (No, really)         300 Lakeside Drive  Oakland, CA 94612
"(Windows NT) version 5.0 will build on a proven system architecture
 and incorporate tens of thousands of bug fixes from version 4.0."
                 -- <http://www.microsoft.com/y2k.asp?A=7&B=5>

Re: [HACKERS] Suggestions

From
The Hermit Hacker
Date:
On Mon, 4 May 1998, David Gould wrote:

> > On Sun, 3 May 1998, Michael Richards wrote:
> > >
> > > Hi.
> > > I have a suggestion. I would be interested in implementing it if ppl think
> > > it is a good idea.
> > >
> > > Why not have a default location where postgres writes its log files. The
> > > current way of doing it seems to be a little klunky.
> > > I have an either/or suggested fix.
> > > a) add a switch to specify where the info and the errors files go,
> > > /var/log/postgres/info and maybe /var/log/postgres/errors
> > >
> > > b) write all the stuff to syslog
> >
> >     b) is the preferred way of doing it...it should just be a matter
> > of adding it to backend/utils/elog.c ...
> >
>
> One problem might be that postgres can write _a_ _lot_ of messages to
> the log and I would not want to fill my /var/log partition with them as
> this would interfere with other logging.

    Use syslog.conf to redirect to a different file on a different
partition...benefit to using syslog is that you can rotate the log files
wihtout having to restart the postmaster ...