Hi Shihao, On Tue, Nov 03, 2026 at 10:32:25PM -0500, shihao zhong wrote: > 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.
Thanks for looking at it! I think that an extension can trigger it without shrinking the relation: start a large sequential scan with allow_strat = true, then call table_rescan_set_params() with allow_strat = false. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
