Re: Forcibly vacating locks

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Forcibly vacating locks
Дата
Msg-id 1214230665.9468.690.camel@ebony.site
обсуждение исходный текст
Ответ на Re: Forcibly vacating locks  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Forcibly vacating locks  (Laurent Birtz <laurent.birtz@kryptiva.com>)
Список pgsql-general
On Fri, 2008-06-20 at 18:38 -0400, Bruce Momjian wrote:
> Laurent Birtz wrote:
> > > No.  The closest thing we have is log_lock_waits in 8.3.  I wonder if
> > > you could hack up something to monitor the server logs for such messages
> > > and cancel the queries.
> >
> > Assuming I can monitor the logs in this way, how would I cancel the
> > queries (or lack thereof, in the case of a client that sits doing nothing
> > with a held lock)?
>
> Use log_line_prefix to get the process id in the log line, then use
> pg_cancel_backend() on the process id.
>
> > >> 2) Is there any hostility about the notion of implementing this feature
> > >>     into Postgres?
> > >
> > > Probabably --- it seems like a narrow use case.
> >
> > I'll consider this to be the definite answer unless I hear a dissenting
> > opinion in the next few days.
>
> Yea, I might be wrong.

I think you're very right. Don't ever want to see locks disappearing
because of a timeout, sorry Laurent.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


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

Предыдущее
От: ptjm@news-reader-radius.uniserve.com (Patrick TJ McPhee)
Дата:
Сообщение: Re: Importing undelimited files (Flat Files or Fixed-Length records)
Следующее
От: Bill Thoen
Дата:
Сообщение: Re: Importing undelimited files (Flat Files or Fixed-Length records)