@@ -121,7 +121,7 @@ typedef struct CkptTsStatus
121
121
* Type for array used to sort SMgrRelations
122
122
*
123
123
* FlushRelationsAllBuffers shares the same comparator function with
124
- * DropRelFileLocatorsAllBuffers . Pointer to this struct and RelFileLocator must be
124
+ * DropRelationsAllBuffers . Pointer to this struct and RelFileLocator must be
125
125
* compatible.
126
126
*/
127
127
typedef struct SMgrSortArray
@@ -483,10 +483,10 @@ static BufferDesc *BufferAlloc(SMgrRelation smgr,
483
483
BufferAccessStrategy strategy ,
484
484
bool * foundPtr );
485
485
static void FlushBuffer (BufferDesc * buf , SMgrRelation reln );
486
- static void FindAndDropRelFileLocatorBuffers (RelFileLocator rlocator ,
487
- ForkNumber forkNum ,
488
- BlockNumber nForkBlock ,
489
- BlockNumber firstDelBlock );
486
+ static void FindAndDropRelationBuffers (RelFileLocator rlocator ,
487
+ ForkNumber forkNum ,
488
+ BlockNumber nForkBlock ,
489
+ BlockNumber firstDelBlock );
490
490
static void RelationCopyStorageUsingBuffer (Relation src , Relation dst ,
491
491
ForkNumber forkNum ,
492
492
bool isunlogged );
@@ -3026,7 +3026,7 @@ BufferGetLSNAtomic(Buffer buffer)
3026
3026
}
3027
3027
3028
3028
/* ---------------------------------------------------------------------
3029
- * DropRelFileLocatorBuffers
3029
+ * DropRelationBuffers
3030
3030
*
3031
3031
* This function removes from the buffer pool all the pages of the
3032
3032
* specified relation forks that have block numbers >= firstDelBlock.
@@ -3047,8 +3047,8 @@ BufferGetLSNAtomic(Buffer buffer)
3047
3047
* --------------------------------------------------------------------
3048
3048
*/
3049
3049
void
3050
- DropRelFileLocatorBuffers (SMgrRelation smgr_reln , ForkNumber * forkNum ,
3051
- int nforks , BlockNumber * firstDelBlock )
3050
+ DropRelationBuffers (SMgrRelation smgr_reln , ForkNumber * forkNum ,
3051
+ int nforks , BlockNumber * firstDelBlock )
3052
3052
{
3053
3053
int i ;
3054
3054
int j ;
@@ -3064,8 +3064,8 @@ DropRelFileLocatorBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum,
3064
3064
if (rlocator .backend == MyBackendId )
3065
3065
{
3066
3066
for (j = 0 ; j < nforks ; j ++ )
3067
- DropRelFileLocatorLocalBuffers (rlocator .locator , forkNum [j ],
3068
- firstDelBlock [j ]);
3067
+ DropRelationLocalBuffers (rlocator .locator , forkNum [j ],
3068
+ firstDelBlock [j ]);
3069
3069
}
3070
3070
return ;
3071
3071
}
@@ -3115,8 +3115,8 @@ DropRelFileLocatorBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum,
3115
3115
nBlocksToInvalidate < BUF_DROP_FULL_SCAN_THRESHOLD )
3116
3116
{
3117
3117
for (j = 0 ; j < nforks ; j ++ )
3118
- FindAndDropRelFileLocatorBuffers (rlocator .locator , forkNum [j ],
3119
- nForkBlock [j ], firstDelBlock [j ]);
3118
+ FindAndDropRelationBuffers (rlocator .locator , forkNum [j ],
3119
+ nForkBlock [j ], firstDelBlock [j ]);
3120
3120
return ;
3121
3121
}
3122
3122
@@ -3162,16 +3162,15 @@ DropRelFileLocatorBuffers(SMgrRelation smgr_reln, ForkNumber *forkNum,
3162
3162
}
3163
3163
3164
3164
/* ---------------------------------------------------------------------
3165
- * DropRelFileLocatorsAllBuffers
3165
+ * DropRelationsAllBuffers
3166
3166
*
3167
3167
* This function removes from the buffer pool all the pages of all
3168
3168
* forks of the specified relations. It's equivalent to calling
3169
- * DropRelFileLocatorBuffers once per fork per relation with
3170
- * firstDelBlock = 0.
3171
- * --------------------------------------------------------------------
3169
+ * DropRelationBuffers once per fork per relation with firstDelBlock = 0.
3170
+ * --------------------------------------------------------------------
3172
3171
*/
3173
3172
void
3174
- DropRelFileLocatorsAllBuffers (SMgrRelation * smgr_reln , int nlocators )
3173
+ DropRelationsAllBuffers (SMgrRelation * smgr_reln , int nlocators )
3175
3174
{
3176
3175
int i ;
3177
3176
int j ;
@@ -3194,7 +3193,7 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3194
3193
if (RelFileLocatorBackendIsTemp (smgr_reln [i ]-> smgr_rlocator ))
3195
3194
{
3196
3195
if (smgr_reln [i ]-> smgr_rlocator .backend == MyBackendId )
3197
- DropRelFileLocatorAllLocalBuffers (smgr_reln [i ]-> smgr_rlocator .locator );
3196
+ DropRelationAllLocalBuffers (smgr_reln [i ]-> smgr_rlocator .locator );
3198
3197
}
3199
3198
else
3200
3199
rels [n ++ ] = smgr_reln [i ];
@@ -3219,7 +3218,7 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3219
3218
3220
3219
/*
3221
3220
* We can avoid scanning the entire buffer pool if we know the exact size
3222
- * of each of the given relation forks. See DropRelFileLocatorBuffers .
3221
+ * of each of the given relation forks. See DropRelationBuffers .
3223
3222
*/
3224
3223
for (i = 0 ; i < n && cached ; i ++ )
3225
3224
{
@@ -3257,8 +3256,8 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3257
3256
continue ;
3258
3257
3259
3258
/* drop all the buffers for a particular relation fork */
3260
- FindAndDropRelFileLocatorBuffers (rels [i ]-> smgr_rlocator .locator ,
3261
- j , block [i ][j ], 0 );
3259
+ FindAndDropRelationBuffers (rels [i ]-> smgr_rlocator .locator ,
3260
+ j , block [i ][j ], 0 );
3262
3261
}
3263
3262
}
3264
3263
@@ -3291,7 +3290,7 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3291
3290
uint32 buf_state ;
3292
3291
3293
3292
/*
3294
- * As in DropRelFileLocatorBuffers , an unlocked precheck should be
3293
+ * As in DropRelationBuffers , an unlocked precheck should be
3295
3294
* safe and saves some cycles.
3296
3295
*/
3297
3296
@@ -3331,7 +3330,7 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3331
3330
}
3332
3331
3333
3332
/* ---------------------------------------------------------------------
3334
- * FindAndDropRelFileLocatorBuffers
3333
+ * FindAndDropRelationBuffers
3335
3334
*
3336
3335
* This function performs look up in BufMapping table and removes from the
3337
3336
* buffer pool all the pages of the specified relation fork that has block
@@ -3340,9 +3339,9 @@ DropRelFileLocatorsAllBuffers(SMgrRelation *smgr_reln, int nlocators)
3340
3339
* --------------------------------------------------------------------
3341
3340
*/
3342
3341
static void
3343
- FindAndDropRelFileLocatorBuffers (RelFileLocator rlocator , ForkNumber forkNum ,
3344
- BlockNumber nForkBlock ,
3345
- BlockNumber firstDelBlock )
3342
+ FindAndDropRelationBuffers (RelFileLocator rlocator , ForkNumber forkNum ,
3343
+ BlockNumber nForkBlock ,
3344
+ BlockNumber firstDelBlock )
3346
3345
{
3347
3346
BlockNumber curBlock ;
3348
3347
@@ -3397,7 +3396,7 @@ FindAndDropRelFileLocatorBuffers(RelFileLocator rlocator, ForkNumber forkNum,
3397
3396
* bothering to write them out first. This is used when we destroy a
3398
3397
* database, to avoid trying to flush data to disk when the directory
3399
3398
* tree no longer exists. Implementation is pretty similar to
3400
- * DropRelFileLocatorBuffers () which is for destroying just one relation.
3399
+ * DropRelationBuffers () which is for destroying just one relation.
3401
3400
* --------------------------------------------------------------------
3402
3401
*/
3403
3402
void
@@ -3416,7 +3415,7 @@ DropDatabaseBuffers(Oid dbid)
3416
3415
uint32 buf_state ;
3417
3416
3418
3417
/*
3419
- * As in DropRelFileLocatorBuffers , an unlocked precheck should be
3418
+ * As in DropRelationBuffers , an unlocked precheck should be
3420
3419
* safe and saves some cycles.
3421
3420
*/
3422
3421
if (bufHdr -> tag .rlocator .dbOid != dbid )
@@ -3561,7 +3560,7 @@ FlushRelationBuffers(Relation rel)
3561
3560
bufHdr = GetBufferDescriptor (i );
3562
3561
3563
3562
/*
3564
- * As in DropRelFileLocatorBuffers , an unlocked precheck should be
3563
+ * As in DropRelationBuffers , an unlocked precheck should be
3565
3564
* safe and saves some cycles.
3566
3565
*/
3567
3566
if (!RelFileLocatorEquals (bufHdr -> tag .rlocator , rel -> rd_locator ))
@@ -3616,7 +3615,7 @@ FlushRelationsAllBuffers(SMgrRelation *smgrs, int nrels)
3616
3615
3617
3616
/*
3618
3617
* Save the bsearch overhead for low number of relations to sync. See
3619
- * DropRelFileLocatorsAllBuffers for details.
3618
+ * DropRelationsAllBuffers for details.
3620
3619
*/
3621
3620
use_bsearch = nrels > RELS_BSEARCH_THRESHOLD ;
3622
3621
@@ -3634,7 +3633,7 @@ FlushRelationsAllBuffers(SMgrRelation *smgrs, int nrels)
3634
3633
uint32 buf_state ;
3635
3634
3636
3635
/*
3637
- * As in DropRelFileLocatorBuffers , an unlocked precheck should be
3636
+ * As in DropRelationBuffers , an unlocked precheck should be
3638
3637
* safe and saves some cycles.
3639
3638
*/
3640
3639
@@ -3864,7 +3863,7 @@ FlushDatabaseBuffers(Oid dbid)
3864
3863
bufHdr = GetBufferDescriptor (i );
3865
3864
3866
3865
/*
3867
- * As in DropRelFileLocatorBuffers , an unlocked precheck should be
3866
+ * As in DropRelationBuffers , an unlocked precheck should be
3868
3867
* safe and saves some cycles.
3869
3868
*/
3870
3869
if (bufHdr -> tag .rlocator .dbOid != dbid )
0 commit comments