Re: finding the other statement causing a sharelock

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: finding the other statement causing a sharelock
Дата
Msg-id m2k4km1kx8.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: finding the other statement causing a sharelock  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> I've some strong suspect... and I'd like to exit earlier from a
> function if a process is running but I'm not really sure how to add a
> semaphore...

Maybe pg_try_advisory_lock() would help you there?

  http://www.postgresql.org/docs/8.3/static/explicit-locking.html#ADVISORY-LOCKS
  http://www.postgresql.org/docs/8.3/static/functions-admin.html#FUNCTIONS-ADVISORY-LOCKS

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

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

Предыдущее
От: Andy
Дата:
Сообщение: Re: Why facebook used mysql ?
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Re: Why facebook used mysql ?