Re: [HACKERS] Re: still no log

From: "rob" <rob(at)cabrion(dot)com>
To: "Craig L(dot) Ching" <cching(at)mqsoftware(dot)com>, "'Martin A(dot) Marques'" <martin(at)math(dot)unl(dot)edu(dot)ar>, "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: still no log
Date: 2001-01-11 12:07:18
Message-ID: 001001c07bc7$0f055550$4100fd0a@cabrion.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

You need to edit /etc/rc.d/init.d/postgresql

change the line that looks like this:

su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start
>/dev/null 2>&1"
to:

su -l postgres -c "/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start
>> /var/log/postgres 2>&1"

Notice the appended redirection (>>) and the file name (/var/log/postgres)

I'm pretty sure the logrotate entries are disabled by default. They cannot
rotate the logs unless the postmaster is stopped/restarted at the time of
rotate and you may not want your posmaster going down unexpectedly in a 24x7
application.

As to why RPM's install this way, I have no idea. I'm just grateful they
exist.

--rob

----- Original Message -----
From: "Craig L. Ching" <cching(at)mqsoftware(dot)com>
To: "'Martin A. Marques'" <martin(at)math(dot)unl(dot)edu(dot)ar>; "Oliver Elphick"
<olly(at)lfix(dot)co(dot)uk>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>;
<pgsql-hackers(at)postgresql(dot)org>
Sent: Wednesday, January 10, 2001 7:49 PM
Subject: RE: [HACKERS] Re: still no log

> I just jumped in on this thread so I'm not sure where you're looking for
the
> logging, but postgreSQL has the following option when building (from
> './configure --help'):
>
> --enable-syslog enable logging to syslog
>
> I saw that you're installing from RPM's so this won't help and I'm not
even
> sure that this is the logging about which you're talking, but thought I'd
> post just in case!
>
> Cheers,
> Craig
>
> -----Original Message-----
> From: Martin A. Marques [mailto:martin(at)math(dot)unl(dot)edu(dot)ar]
> Sent: Wednesday, January 10, 2001 6:19 PM
> To: Oliver Elphick
> Cc: pgsql-general; pgsql-hackers(at)postgresql(dot)org
> Subject: [HACKERS] Re: still no log
>
>
> El Mié 10 Ene 2001 21:07, escribiste:
> > "Martin A. Marques" wrote:
> > >Sorry for the insistence, but after looking and looking again, I
can't
> > > find out why the postgres logs are empty. The postgres database is
up
> > > and working
> > >
> > >great, but nothing is getting logged.
> > >I'm on a RedHat Linux (6.0 with lot of upgrades)
> > >postgres 7.0.3 from rpm (downoaded from the postgres ftp server)
> > >
> > >Any ideas?
> >
> > If postmaster is started with -S, nothing gets logged. Is that your
> > problem?
>
> Well, I'm not sure. I can't recall checking that in the startup script,
but
> I
> think it's not there. Any way, why would the instalation make the entries
in
>
> the logroutate config files and then have a startup script that won't do
> logging? I'm using the normal startup script in /etc/rc.d/init.d/.
>
> Saludos... :-)
>
> --
> System Administration: It's a dirty job,
> but someone told I had to do it.
> -----------------------------------------------------------------
> Martín Marqués email: martin(at)math(dot)unl(dot)edu(dot)ar
> Santa Fe - Argentina http://math.unl.edu.ar/~martin/
> Administrador de sistemas en math.unl.edu.ar
> -----------------------------------------------------------------
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message drevil 2001-01-11 12:09:14 How to tell if that UPDATE worked?
Previous Message Rajit Singh 2001-01-11 12:00:07 Selective Auto-Timestamp [using triggers?]

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-01-11 12:42:10 drop table and pg_proc
Previous Message Oleg Bartunov 2001-01-11 10:54:06 Re: AW: Re: GiST for 7.1 !!