@@ -133,16 +133,14 @@ typedef struct
133
133
*/
134
134
typedef struct PartStatusInfo
135
135
{
136
- Oid relid ; /* key */
137
- int32 refcount ; /* reference counter */
138
- bool is_valid ; /* is this entry fresh? */
136
+ Oid relid ; /* key */
139
137
struct PartRelationInfo * prel ;
140
138
} PartStatusInfo ;
141
139
142
140
/*
143
141
* PartParentInfo
144
142
* Cached parent of the specified partition.
145
- * Allows us to quickly search for PartRelationInfo.
143
+ * Allows us to quickly search for parent PartRelationInfo.
146
144
*/
147
145
typedef struct PartParentInfo
148
146
{
@@ -177,7 +175,9 @@ typedef struct PartBoundInfo
177
175
*/
178
176
typedef struct PartRelationInfo
179
177
{
180
- PartStatusInfo * psin ; /* entry holding this prel */
178
+ Oid relid ; /* key */
179
+ int32 refcount ; /* reference counter */
180
+ bool fresh ; /* is this entry fresh? */
181
181
182
182
bool enable_parent ; /* should plan include parent? */
183
183
@@ -214,14 +214,18 @@ typedef struct PartRelationInfo
214
214
* PartRelationInfo field access macros & functions.
215
215
*/
216
216
217
- #define PrelParentRelid (prel ) ( (prel)->psin-> relid )
217
+ #define PrelParentRelid (prel ) ( (prel)->relid )
218
218
219
219
#define PrelGetChildrenArray (prel ) ( (prel)->children )
220
220
221
221
#define PrelGetRangesArray (prel ) ( (prel)->ranges )
222
222
223
223
#define PrelChildrenCount (prel ) ( (prel)->children_count )
224
224
225
+ #define PrelReferenceCount (prel ) ( (prel)->refcount )
226
+
227
+ #define PrelIsFresh (prel ) ( (prel)->fresh )
228
+
225
229
static inline uint32
226
230
PrelLastChild (const PartRelationInfo * prel )
227
231
{
@@ -265,14 +269,6 @@ AttrNumber *PrelExpressionAttributesMap(const PartRelationInfo *prel,
265
269
TupleDesc source_tupdesc ,
266
270
int * map_length );
267
271
268
- /*
269
- * PartStatusInfo field access macros & functions.
270
- */
271
-
272
- #define PsinIsValid (psin ) ( (psin)->is_valid )
273
-
274
- #define PsinReferenceCount (psin ) ( (psin)->refcount )
275
-
276
272
277
273
/* PartType wrappers */
278
274
static inline void
@@ -312,6 +308,9 @@ PartTypeToCString(PartType parttype)
312
308
313
309
/* Dispatch cache */
314
310
void refresh_pathman_relation_info (Oid relid );
311
+ void invalidate_pathman_relation_info (Oid relid );
312
+ void invalidate_pathman_relation_info_cache (void );
313
+ void close_pathman_relation_info (PartRelationInfo * prel );
315
314
const PartRelationInfo * get_pathman_relation_info (Oid relid );
316
315
const PartRelationInfo * get_pathman_relation_info_after_lock (Oid relid ,
317
316
bool unlock_if_not_found ,
@@ -321,12 +320,6 @@ void shout_if_prel_is_invalid(const Oid parent_oid,
321
320
const PartRelationInfo * prel ,
322
321
const PartType expected_part_type );
323
322
324
- /* Status cache */
325
- PartStatusInfo * open_pathman_status_info (Oid relid );
326
- void close_pathman_status_info (PartStatusInfo * psin );
327
- void invalidate_pathman_status_info (Oid relid );
328
- void invalidate_pathman_status_info_cache (void );
329
-
330
323
/* Bounds cache */
331
324
void forget_bounds_of_partition (Oid partition );
332
325
PartBoundInfo * get_bounds_of_partition (Oid partition , const PartRelationInfo * prel );
0 commit comments