Re: [HACKERS] PID of backend

Поиск
Список
Период
Сортировка
От Dmitry Samersoff
Тема Re: [HACKERS] PID of backend
Дата
Msg-id XFMail.990602195243.dms@wplus.net
обсуждение исходный текст
Ответ на Re: [HACKERS] PID of backend  (Oleg Bartunov <oleg@sai.msu.su>)
Ответы Re: [HACKERS] PID of backend
Список pgsql-hackers
On 02-Jun-99 Oleg Bartunov wrote:
> On Wed, 2 Jun 1999, Dmitry Samersoff wrote:
> 
>> Date: Wed, 02 Jun 1999 18:56:55 +0400 (MSD)
>> From: Dmitry Samersoff <dms@wplus.net>
>> To: pgsql-hackers@postgreSQL.org
>> Subject: [HACKERS] PID of backend
>> 
>>  Hi World! 
>> 
>>  Does backend сreates pid file?
>> 
>>   Postgres 6.5 backend (current CVS) stop answering query
>> 
>>  >>> Jun  2 00:12:32 mail popper[17585]: PgSQL:ROLLBACK failed:
>>  >>> PQsendQuery()
>>  >>> There is no connection to the backend. 
>> 
>>  every 300 000 cursor allocation so I wish to restart it every 100 000
>>  is there a way to do it simple than 
>>    kill  `ps ax | awk .....`
> 
> Have you tried pidof postmaster ?
> kill `pidof postmaster` | ....
 I have no pidof on my computer but it's exactly the same solution.
I need something usable inside program other than scanning process table.
The best one -  add code to create postgres.5432.pid 
to backend startup.

It also is good way to automatically unlink socket file after 
backend crush. (read pidfile, check existence of process and remove file if no process
found)   


---
Dmitry Samersoff, dms@wplus.net, ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] nonblocking lock?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] PID of backend