Robert Haas <robertmhaas@gmail.com> writes:
> e.g. Suppose that you have a table with a unique index on column a.
> Transaction A deletes the tuple where a = 1. Transaction B attempts to
That's DML, I agree with you there, no need. In DML we have MVCC.
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?
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?
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support