Mention FK creation take ShareRowExclusiveLock on referenced table

Поиск
Список
Период
Сортировка
От Adrien NAYRAT
Тема Mention FK creation take ShareRowExclusiveLock on referenced table
Дата
Msg-id c4e8af11-1dfc-766a-c953-76979b9fcdaa@anayrat.info
обсуждение исходный текст
Ответы Re: Mention FK creation take ShareRowExclusiveLock on referencedtable  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-docs
Hello,

A few days ago I was surprised a CREATE TABLE containing FK constraint 
was stuck due to an automatic vacuum freeze (which took 
ShareUpdateExclusiveLock if I remember) on referenced table.

After digging into the code I found theses lines in tablecmds.c :


/*
  * Grab ShareRowExclusiveLock on the pk table, so that someone doesn't
  * delete rows out from under us.
  */


Maybe it should be documented in theses pages?

https://www.postgresql.org/docs/current/static/sql-createtable.html
https://www.postgresql.org/docs/current/static/sql-altertable.html

If you agree I can send a patch.

Regards,


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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: Ambiguous usage of 'any' in explanation
Следующее
От: PG Doc comments form
Дата:
Сообщение: Ambiguity in restore_command for recovery.conf