Re: more contrib: log rotator - Mailing list pgsql-hackers

From cbbrowne@cbbrowne.com
Subject Re: more contrib: log rotator
Date
Msg-id 20030407174041.36BC056035@cbbrowne.com
Whole thread Raw
In response to Re: more contrib: log rotator  (Lamar Owen <lamar.owen@wgcr.org>)
List pgsql-hackers
Lamar Owen wrote:
> On Sunday 06 April 2003 18:54, Andrew Sullivan wrote:
> > On Mon, Apr 07, 2003 at 12:42:34AM +0200, Peter Eisentraut wrote:
> > > My point was that log file rotation should be left up to the system
> > > administrator.  Look at other servers on your system (SMTP, DNS,
> > > whatever).  How do they handle it?
> 
> > PostgreSQL is not a system process, and I think it's a mistake to
> > assume that it is.  We, for instance, do not have root on the
> > machines we use.  It's important to assume that users needn't be
> > system administrators to use the system.

> I personally believe that making the assumption that PostgreSQL is not
> a system process is wrong.  One can run system services as a normal
> user (in fact, it is recommended that as few system services as is
> possible should run as root); but the fact that a daemon is running as
> a normal user doesn't make it not a system process. But that's just a
> difference of system administration opinion.

I think the mistake lies in making the "design" assumption that
PostgreSQL is either one or the other.

- There are contexts in which it forcibly is "systemy," such as when it is used for password authentication using
somethinglike PAM.  In that case, whatever userid it runs as, it's a forcible "system" dependancy. Users can't log in
untilPostgreSQL is running.
 

- There are contexts where it will run as a "part of the system," as is typically the case when someone uses "apt-get
installpostgresql" or "rpm -i postgres*.rpm"
 

- In a "hosted" environment, it may be unacceptable to, in any manner, treat PostgreSQL or any related services as
"partof the system." cron obviously *is* a "part of the system," but if you're not the system administrator, you may
have/no/ ability to connect in to "system" logging services.  (In the environment where  pgrotatelog runs, that is
indeedthe case.)
 

These are /all/ legitimate scenarios for PostgreSQL to be in use.

--> Assuming PostgreSQL /is/ a system process is wrong.
--> Assuming PostgreSQL /is not/ a system process is wrong.

There are situations where either can be true, and it is vital for
PostgreSQL to be able to support both.
--
(concatenate 'string "cbbrowne" "@ntlug.org")
http://www.ntlug.org/~cbbrowne/unix.html
"There  I  was,  lying,  cheating  and back-stabbing  my  way  up  the
corporate ladder, feeling pretty  darn good about myself, when someone
told me  the 'J' in 'WWJD'  meant *Jesus* I thought  it meant *Judas*!
Hoo boy, am I red in the face!"



pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Anyone know why PostgreSQL doesn't support 2 phase execution?
Next
From: Greg Stark
Date:
Subject: Re: No merge sort?