| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера