Re: more contrib: log rotator

From: cbbrowne(at)cbbrowne(dot)com
To: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: more contrib: log rotator
Date: 2003-04-07 17:40:41
Message-ID: 20030407174041.36BC056035@cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 something like PAM. In that
case, whatever userid it runs as, it's a forcible "system" dependancy.
Users can't log in until PostgreSQL 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 install postgresql" or
"rpm -i postgres*.rpm"

- In a "hosted" environment, it may be unacceptable to, in any manner,
treat PostgreSQL or any related services as "part of 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 indeed the 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!"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Peacetree 2003-04-07 18:59:21 Re: Anyone know why PostgreSQL doesn't support 2 phase execution?
Previous Message Rod Taylor 2003-04-07 17:11:44 Re: Anyone know why PostgreSQL doesn't support 2 phase execution?