Cannot cancel LOCK TABLE

Поиск
Список
Период
Сортировка
От Leon
Тема Cannot cancel LOCK TABLE
Дата
Msg-id 379DC238.429A2E75@udmnet.ru
обсуждение исходный текст
Список pgsql-general
Hi!

There we have a need of canceling LOCK TABLE requests
which fail to lock the table in a given time. Scenario is following:
try to issue a lock on a table, wait for a given time for a completion
ot this lock request, and, if it fails, cancel a lock request and go on
processing other queries. A little experimenting showed that LOCK TABLE
requests cannot be canceled. They just sit in the queue of queries
and don't let other queries to be processed. How can I overcome
that? The piece of code where I try to cancel lock request:

     if (difftime(t1,t0) > LOCK_WAIT_TIMEOUT)
     {
      printf("\nTimeout waiting for lock. Try again.\n");
      PQrequestCancel(conn);
      PQsendQuery(conn,"rollback");
      return 1;
     }

--
Leon.
---------
"This may seem a bit weird, but that's okay, because it is weird." -
Perl manpage.


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

Предыдущее
От: Sylvain LE GALL
Дата:
Сообщение: template
Следующее
От: Mike Mascari
Дата:
Сообщение: Re: [GENERAL] Problem Compiling C-functions