On Fri, Sep 30, 2022 at 9:38 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'm too tired to think this through completely clearly, but this
> sounds right, and what it seems to imply is that this race condition
> exists in all PG versions.
I think that the heap_delete() issue is probably in all PG versions.
> Which would imply that we need to do the
> work to back-patch these three fixes into v11/v10.
I am not aware of any reason why we should need the heap_update()
fixes to be backpatched any further. Though I will need to think about
it some more.
> So what is bothering me about this line of thought is: how come
> there have not been reports of these failures in older branches?
> Is there some aspect we're not thinking about that masks the bug?
The likely explanation is that Robins was able to find the
heap_delete() bug by throwing lots of resources (human effort and
machine time) into it. It literally took weeks of adversarial
stress-testing to find the bug. It's entirely possible and perhaps
likely that this isn't representative of real world conditions in some
crucial way.
--
Peter Geoghegan