Robert Haas wrote:
> > A predicate can include columns from an index plus others.
> > Am I missing something?
>
> Hmm, interesting point. In that case you couldn't use the index to
> enforce predicate locking under MVCC without disabling HOT. But there
> will be other cases where that wouldn't help anyway - a predicate
> could also include unindexed columns exclusively. For those, the
> traditional approach (not the one discussed in this paper) probably
> requires locking against any heap insert, or checking each new heap
> insert against the constraint, or... something.
If I understand that correctly
> [...] by acquiring a shared lock on the next
> row in order, as a scan is made to check whether rows match a predicate.
> The scan might be through the data records or through an index
I would say that in the case of a table scan, the whole table will
be SILOCKed. I guess that's pretty much unavoidable if you want
serializability.
Yours,
Laurenz Albe