Re: a modest improvement to get_object_address()

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: a modest improvement to get_object_address()
Дата
Msg-id CA+TgmoaTchWYuTFR7oJkN60bFTxu8BzXUpiWNsrhCR12=f9mGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: a modest improvement to get_object_address()  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On Wed, Nov 9, 2011 at 3:40 PM, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
> Back to the problem you raised, it's DDL and we're sitting in between
> SnapshotNow and catalog cache entries.  Not so comfy.  I would guess
> that the problem (I confess didn't read carefully enough) happens after
> having done a cache lookup when trying to use its result?

There's a test case in the original post, but yes, the problem happens
when something changes between the time you do the catcache lookup and
the time you acquire the lock.  This is not a new problem; I'm just
trying to give a more intelligible error message - and avoid
unnecessary failures, as in the case where two concurrent DROP IF
EXISTS operations target the same object and one of them unnecessarily
rolls back.

> Could we check the object still exists as part of the cache lookup, or
> would that mean we don't have a cache anymore?  Or is the answer related
> to consuming invalidation messages before returning a stale entry from
> the cache?

All of that is way beyond the scope of what I'm doing here.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: const correctness
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Syntax for partitioning