Re: [HACKERS] PID of backend

From: Dmitry Samersoff <dms(at)wplus(dot)net>
To: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] PID of backend
Date: 1999-06-02 15:52:43
Message-ID: XFMail.990602195243.dms@wplus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)wplus(dot)net>
>> To: pgsql-hackers(at)postgreSQL(dot)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(at)wplus(dot)net, ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-06-02 17:32:53 Re: [HACKERS] PID of backend
Previous Message Bruce Momjian 1999-06-02 15:33:23 Re: [HACKERS] nonblocking lock?