Building an invalidation queue in Postgres - Mailing list pgsql-general

From Laurence Rowe
Subject Building an invalidation queue in Postgres
Date
Msg-id CAOycyLSi4_s9h12PExW1YXSzhP2nJXnfFbfgRie1n0ZMfg40HA@mail.gmail.com
Whole thread Raw
List pgsql-general
I'd like to cache parts of my database locally on each client. To keep
those caches in sync I'd like to implement an invalidation queue.

A naïve approach would be to simply create a table of (txn_id,
invalidated_object_ids), then have the clients query this table for
txn_ids > last_queried_txn_id. But I suspect this could result in
invalidations being missed for long running transactions due to MVCC
visibility issues.

How might I go about implementing such a queue safely in Postgres?

Laurence


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unexpected behaviour of encode()
Next
From: Erik Jones
Date:
Subject: Re: Age of the WAL?