Re: [HACKERS] postmaster.pid
От | Tim Holloway |
---|---|
Тема | Re: [HACKERS] postmaster.pid |
Дата | |
Msg-id | 38487294.9782E711@southeast.net обсуждение исходный текст |
Ответ на | postmaster.pid (Tatsuo Ishii <t-ishii@sra.co.jp>) |
Ответы |
Re: [HACKERS] postmaster.pid
|
Список | pgsql-hackers |
I hope you don't mind being superseded. I hope (FINALLY!) to be able to post the patches for the log subsystem in the next week or three. The log system has a fairly sophisticated set of options which required a config file of its own. Rather than have two options file, I absorbed pg_options and made a general options file: "postgres.conf". Could you accept this: /* postgres.conf */ environment {port 5432;pidfile "/usr/local/pgsql/data";/* etc. */ } debugging { /* pg_options info */ } logging { /* logging info */ } For more info, see http://216.199.14.27/ regards, Tim Holloway The logger supports reporting the run environment, BTW. I find that way I don't pick up the wrong config file and only "think" I know what options are in effect (it also reports where it GOT the config file). Tatsuo Ishii wrote: > > Hi, > > I have committed changes to postmaster.c. Now it creates a file called > "postmaster.pid" under $PGDATA, which holds postmaster's process > id. If the file has already existed, postmaster won't start. So we > cannot start more than on postmaster with same $PGDATA any more. I > believe it's a good thing. The file will be deleted upon postmaster > shutting down. > > Another file "postmaster.opts" is also created under $PGDATA. It > contains the path to postmaster and each option for postmaster per > line. Example contents are shown below: > > /usr/local/pgsql/bin/postmaster > -p 5432 > -D /usr/local/pgsql/data > -B 64 > -b /usr/local/pgsql/bin/postgres > -N 32 > -S > > Note that even options execpt -S is not explicitly supplied in the > case above (postmaster -S), other opts are shown. This file is not > only convenient to restart postmaster but also is usefull to determin > with what defaults postmaster is running, IMHO. > > With these changes now we can stop postmaster: > > kill `cat /usr/local/pgsql/data/postmaster.pid` > > To restart it with previous options: > > eval `cat /usr/local/pgsql/data/postmaster.opts` > > I'm going to write pg_ctl script this week end. > > BTW, no initdb required, of course. > -- > Tatsuo Ishii > > ************
В списке pgsql-hackers по дате отправления: