Обсуждение: [DOCS] Correction in SHARE ROW EXCLUSIVE lock description

Поиск
Список
Период
Сортировка

[DOCS] Correction in SHARE ROW EXCLUSIVE lock description

От
diemersebastien@yahoo.fr
Дата:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.4/static/explicit-locking.html
Description:

The documentation says :

"This lock mode is not automatically acquired by any PostgreSQL command."

I am wrong if I say that a "ADD CONSTRAINT toto FOREIGN KEY" command will
take a SHARE ROW EXCLUSIVE lock on both tables concerned by the foreign key
?

--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

Re: [DOCS] Correction in SHARE ROW EXCLUSIVE lock description

От
Euler Taveira
Дата:
2017-10-09 6:07 GMT-03:00  <diemersebastien@yahoo.fr>:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.4/static/explicit-locking.html
> Description:
>
> The documentation says :
>
> "This lock mode is not automatically acquired by any PostgreSQL command."
>
You are reading 9.4 documentation but...

> I am wrong if I say that a "ADD CONSTRAINT toto FOREIGN KEY" command will
> take a SHARE ROW EXCLUSIVE lock on both tables concerned by the foreign key
> ?
>
... you are testing with >= 9.5. Indeed, SREL replaced AEL in this
ALTER TABLE case [1].


[1] https://www.postgresql.org/docs/9.5/static/explicit-locking.html


--   Euler Taveira                                   Timbira -
http://www.timbira.com.br/  PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs