Re: [HACKERS] PID of backend

Поиск
Список
Период
Сортировка
От Dmitry Samersoff
Тема Re: [HACKERS] PID of backend
Дата
Msg-id XFMail.990602220924.dms@wplus.net
обсуждение исходный текст
Ответ на Re: [HACKERS] PID of backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] PID of backend  (Bruce Momjian <maillist@candle.pha.pa.us>)
Re: [HACKERS] PID of backend  (The Hermit Hacker <scrappy@hub.org>)
Список pgsql-hackers
On 02-Jun-99 Tom Lane wrote:
>>>> 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 .....`
> 
> Why in the world do you want to use kill at all?  If you want to get
> rid of your current backend, just close the connection.  I really doubt
> that killing the postmaster is necessary or appropriate.
> 
> (Of course the real answer is to find a way to avoid the memory leak that
> I suppose you are running into.  But you haven't given us enough info
> to offer any advice in that direction.)
> 
>> I need something usable inside program other than scanning process table.
> 
> There is a libpq function that will tell you the PID of the currently
> connected backend: PQbackendPID.  But it's not usually good for much
> except debugging purposes.

Thanks ! It's exactly what I need. (But it s'seems not documented ?) 

I need to restart backend because (as written  above) 
every 300 000 "open cursor" query completly loose it's mind.



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


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

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