gpdb
gpdb copied to clipboard
Fix data lost due to incorrect sharedsnapshot, the DSM way
This reapplies commit 1beead0c0f49d3456a810a33780b1fb51e0576c9, instead of pre-allocating the possible max size array for every slot and every backend in shared memory, this commit uses the dynamic shared memory to pass the subxip array only.
Based on https://github.com/greenplum-db/gpdb/pull/17327
Why is it still WIP and the pipeline failing?
The technique is to replace all subxip arrays in snapshots with DSM when used with SharedSnapshot. It seems that some places have been missed.
https://dev.ci.gpdb.pivotal.io/teams/main/pipelines/gpdb-dev-dsm_subxip_array-rocky8
Fixes https://github.com/greenplum-db/gpdb/issues/17275
This PR looks good to me, but since I'm not so familiar with the DSM, so it's better to have another to review it again.
And I simple updated the original issue with #issuecomment-2099595727, maybe you know more than me.