> On Mar 9, 2021, at 1:35 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> 
> So, to accept a patch that shortens the line pointer array, what we need
> to do is verify that every such code path checks for an out-of-range
> offset before trying to fetch the target line pointer.  I believed
> back in 2007 that there were, or once had been, code paths that omitted
> such a range check, assuming that they could trust the TID they had
> gotten from $wherever to point at an extant line pointer array entry.
> Maybe things are all good now, but I think you should run around and
> examine every place that checks for tuple deadness to see if the offset
> it used is known to be within the current page bounds.

Much as Pavan asked [1], I'm curious how we wouldn't already be in trouble if 
such code exists?  In such a scenario, what stops a dead line pointer from 
being reused (rather than garbage collected by this patch) prior to such 
hypothetical code using an outdated TID?

I'm not expressing a view here, just asking questions.

[1] 
https://www.postgresql.org/message-id/2e78013d0709130832t31244e79k9488a3e4eb00d64c%40mail.gmail.com

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





Reply via email to