pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2022-11-17 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). This is a back-patch of the v15-era commit f10f0ae42 into older supported branches. The idea is to design out bugs in which an ill-timed relcache flush clears rel->rd_smgr partway through some code sequence that wasn't expecting that. We had ano

pgsql: Replace RelationOpenSmgr() with RelationGetSmgr().

2021-07-12 Thread Tom Lane
Replace RelationOpenSmgr() with RelationGetSmgr(). The idea behind this patch is to design out bugs like the one fixed by commit 9d523119f. Previously, once one did RelationOpenSmgr(rel), it was considered okay to access rel->rd_smgr directly for some not-very-clear interval. But since that poin