Re: [HACKERS] Re: still no log - Mailing list pgsql-general
From | rob |
---|---|
Subject | Re: [HACKERS] Re: still no log |
Date | |
Msg-id | 001001c07bc7$0f055550$4100fd0a@cabrion.org Whole thread Raw |
In response to | RE: [HACKERS] Re: still no log ("Craig L. Ching" <cching@mqsoftware.com>) |
List | pgsql-general |
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@mqsoftware.com> To: "'Martin A. Marques'" <martin@math.unl.edu.ar>; "Oliver Elphick" <olly@lfix.co.uk> Cc: "pgsql-general" <pgsql-general@postgresql.org>; <pgsql-hackers@postgresql.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@math.unl.edu.ar] > Sent: Wednesday, January 10, 2001 6:19 PM > To: Oliver Elphick > Cc: pgsql-general; pgsql-hackers@postgresql.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@math.unl.edu.ar > Santa Fe - Argentina http://math.unl.edu.ar/~martin/ > Administrador de sistemas en math.unl.edu.ar > ----------------------------------------------------------------- >
pgsql-general by date: