On 2013-08-29 10:39:09 -0400, Robert Haas wrote:
> I have been of the opinion for some time now that the
> shared-invalidation code is not a particularly good design for much of
> what we need.  Waiting for an old snapshot is often a proxy for
> waiting long enough that we can be sure every other backend will
> process the shared-invalidation message before it next uses any of the
> cached data that will be invalidated by that message.  However, it
> would be better to be able to send invalidation messages in some way
> that causes them to processed more eagerly by other backends, and that
> provides some more specific feedback on whether or not they have
> actually been processed.  Then we could send the invalidation
> messages, wait just until everyone confirms that they have been seen,
> which should hopefully happen quickly, and then proceed.

Actually, the shared inval code already has that knowledge, doesn't it?
ISTM all we'd need is have a "sequence number" of SI entries which has
to be queryable. Then one can simply wait till all backends have
consumed up to that id which we keep track of the furthest back backend
in shmem.

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to