|
|
|
@ -572,22 +572,21 @@ RelationGetSmgr(Relation rel) |
|
|
|
smgrsetowner(&(rel->rd_smgr), smgropen(rel->rd_locator, rel->rd_backend)); |
|
|
|
smgrsetowner(&(rel->rd_smgr), smgropen(rel->rd_locator, rel->rd_backend)); |
|
|
|
return rel->rd_smgr; |
|
|
|
return rel->rd_smgr; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* RelationCloseSmgr |
|
|
|
* RelationCloseSmgr |
|
|
|
* Close the relation at the smgr level, if not already done. |
|
|
|
* Close the relation at the smgr level, if not already done. |
|
|
|
* |
|
|
|
|
|
|
|
* Note: smgrclose should unhook from owner pointer, hence the Assert. |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
#define RelationCloseSmgr(relation) \ |
|
|
|
static inline void |
|
|
|
do { \
|
|
|
|
RelationCloseSmgr(Relation relation) |
|
|
|
if ((relation)->rd_smgr != NULL) \
|
|
|
|
{ |
|
|
|
{ \
|
|
|
|
if (relation->rd_smgr != NULL) |
|
|
|
smgrclose((relation)->rd_smgr); \
|
|
|
|
smgrclose(relation->rd_smgr); |
|
|
|
Assert((relation)->rd_smgr == NULL); \
|
|
|
|
|
|
|
|
} \
|
|
|
|
/* smgrclose should unhook from owner pointer */ |
|
|
|
} while (0) |
|
|
|
Assert(relation->rd_smgr == NULL); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#endif /* !FRONTEND */ |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* RelationGetTargetBlock |
|
|
|
* RelationGetTargetBlock |
|
|
|
|