Re: relation ### modified while in use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: relation ### modified while in use
Дата
Msg-id 25813.973185639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: relation ### modified while in use  (Hiroshi Inoue <Inoue@tpf.co.jp>)
Ответы RE: relation ### modified while in use  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Do we have a conclusion about this thread ?
> If no,how about changing heap_open(r) so that they allocate
> Relation descriptors after acquiring a lock on the table ?
> We would use LockRelation() no longer.

That won't do by itself, because that will open us up to failures when
a relcache invalidation arrives mid-transaction and we don't happen to
have the relation open at the time.  We could still have parse/plan
results that depend on the old relation definition.

Really we need to fix things so that a lock is held from first use to
end of transaction, independently of heap_open/heap_close.
        regards, tom lane


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

Предыдущее
От: Jade Rubick
Дата:
Сообщение: Another remove request
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LIMIT in DECLARE CURSOR: request for comments