Hi Bertrand, I am not sure the dangling pointer case can happen on master today.
initscan() only frees the strategy if SO_ALLOW_STRAT gets cleared or the table drops below NBuffers / 4. The only caller of table_rescan_set_params() is SampleScan, and a sample scan has no read stream on master. I don't think the table can shrink either, because truncation takes an AE today. This is something I really hope we can get fixed/improved. Back to the main topic, I think on master the worst case scenario is the one in your 0002, which causes more buffer pollution. Thanks, Shihao
