Re: [HACKERS] PID of backend

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Dmitry Samersoff <dms(at)wplus(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgreSQL(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: [HACKERS] PID of backend
Date: 1999-06-02 18:14:55
Message-ID: 199906021814.OAA13395@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[Charset KOI8-R unsupported, filtering to ASCII...]
>
> 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.

I hope 6.5 due on June 7 will fix your problems.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message BA Walker 1999-06-02 18:51:46 Questions
Previous Message Dmitry Samersoff 1999-06-02 18:09:24 Re: [HACKERS] PID of backend