Advisory locks

Поиск
Список
Период
Сортировка
От Tom Paynter
Тема Advisory locks
Дата
Msg-id da68e78ba167e84fc7e58c74ac5ae64d.squirrel@webmail.tdpe.co.uk
обсуждение исходный текст
Ответы Re: Advisory locks  (daku.sandor@gmail.com)
Список pgsql-sql
Hello All,

I have a quick question about advisory locks, that I have not been able to
figure out from the documentation.


Say I have two tables:
CREATE TABLE table_a
(
table_a_id        serial primary key,
some more rows....
);

CREATE TABLE table_b
(
table_b_id        serial primary key,
some more rows....
);


And I execute the following lines (from separate sessions):
SELECT pg_advisory_lock(table_a_id) FROM table_a WHERE table_a_id=5;
SELECT pg_advisory_lock(table_b_id) FROM table_b WHERE table_b_id=5;


Will this try to acquire the same lock?
Or is the id tied to the table somehow?


Thanks for your time.
Tom




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

Предыдущее
От: Glyn Astill
Дата:
Сообщение: Re: Implementing incremental client updates
Следующее
От: "Tom Paynter"
Дата:
Сообщение: Re: Advisory locks