Re: pg_ctl - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: pg_ctl
Date
Msg-id 19991127110851H.t-ishii@sra.co.jp
Whole thread Raw
In response to Re: pg_ctl  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_ctl  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
From: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: pg_ctl
Date: Fri, 26 Nov 1999 10:38:06 -0500

> Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> > Here is the first draft for the spec of postmaster starting/stopping
> > tool. I have named it as "pg_ctl."
> > o pg_ctl [-w] start
> > start up postmaster.
> 
> How will pg_ctl know what to start --- where do the database directory,
> port number, and path (to locate the postmaster executable) come from?

Very good question. What I'm thinking now is:

the database directory:1) $PGDATA (as an environmnet variable)2) hard coded in the pg_ctl script

the path to postmaster:1) in the command search path2) hard coded in the pg_ctl script3) assume that postmaster lives
inthe same directory where pg_ctl   has been put
 

> > It would be nice if it could report,
> > for example, the number of backends running (and their pids) etc. For
> > this purpose I propose followings:
> 
> > (1) Add another protocol STATUS_REQUEST_CODE to libpq/pqcomm.h.
> 
> > (2) Add code to process the protocol in
> > postmaster/postmaster.c:readStartupPacket().
> 
> Security issues may be a factor here.  Do you want just anyone anywhere
> on the net to be able to extract the postmaster status?  If not, how
> shall we restrict it?

I think a resonable restriction would be let anyone on the same
machine that postmaster is running could issue the protocol.

Another idea might be using our host based authentication. What about
having a "virtual database" used only for the status request protocol?
For example, with below setting, any authenticated user on the net
192.168.0.0 could send the protocol. "statusdb" indicates that backend
should treat it in the special way.

host  statusdb   192.168.0.0   255.255.255.0     crypt
--
Tatsuo Ishii



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re:
Next
From: Lamar Owen
Date:
Subject: Re: [HACKERS] Re: pg_ctl