Re: AW: AW: AW: relation ### modified while in use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AW: AW: AW: relation ### modified while in use
Дата
Msg-id 8375.972311791@sss.pgh.pa.us
обсуждение исходный текст
Ответ на AW: AW: AW: relation ### modified while in use  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список pgsql-hackers
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
> No, the above is not a valid example, because Session 2 won't
> get the exclusive lock until Session 1 commits, since Session 1 already 
> holds a lock on foo (for the inserted row). 

> You were talking about the "select only" case (and no for update eighter). 
> I think that select statements need a shared lock for the duration of their 
> execution only.

You seem to think that locks on individual tuples conflict with
table-wide locks.  AFAIK that's not true.  The only way to prevent
another xact from gaining AccessExclusiveLock on a table is to be
holding some lock *on the table*.

As for your claim that read-only xacts don't need to worry about
preventing schema updates, what of adding/deleting ON SELECT rules?
        regards, tom lane


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

Предыдущее
От: Larry Rosenman
Дата:
Сообщение: Re: testing my connection to list.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql/src/test/regress/expected (plpgsql.out inet.out foreign_key.out errors.out)