pgsql: Prevent access to no-longer-pinned buffer in heapam_tuple_lock()

2022-04-13 Thread Tom Lane
Prevent access to no-longer-pinned buffer in heapam_tuple_lock(). heap_fetch() used to have a "keep_buf" parameter that told it to return ownership of the buffer pin to the caller after finding that the requested tuple TID exists but is invisible to the specified snapshot. This was thoughtlessly r

pgsql: Prevent access to no-longer-pinned buffer in heapam_tuple_lock()

2022-04-13 Thread Tom Lane
Prevent access to no-longer-pinned buffer in heapam_tuple_lock(). heap_fetch() used to have a "keep_buf" parameter that told it to return ownership of the buffer pin to the caller after finding that the requested tuple TID exists but is invisible to the specified snapshot. This was thoughtlessly r

pgsql: Prevent access to no-longer-pinned buffer in heapam_tuple_lock()

2022-04-13 Thread Tom Lane
Prevent access to no-longer-pinned buffer in heapam_tuple_lock(). heap_fetch() used to have a "keep_buf" parameter that told it to return ownership of the buffer pin to the caller after finding that the requested tuple TID exists but is invisible to the specified snapshot. This was thoughtlessly r

pgsql: Prevent access to no-longer-pinned buffer in heapam_tuple_lock()

2022-04-13 Thread Tom Lane
Prevent access to no-longer-pinned buffer in heapam_tuple_lock(). heap_fetch() used to have a "keep_buf" parameter that told it to return ownership of the buffer pin to the caller after finding that the requested tuple TID exists but is invisible to the specified snapshot. This was thoughtlessly r