Skip to content

Commit b259931

Browse files
author
Artur Zakirov
committed
Rename forgot functions
1 parent f6b9bdd commit b259931

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

rum.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,9 @@ typedef struct RumConfig
369369

370370
/* XLog stuff */
371371

372-
#define XLOG_GIN_CREATE_INDEX 0x00
372+
#define XLOG_RUM_CREATE_INDEX 0x00
373373

374-
#define XLOG_GIN_CREATE_PTREE 0x10
374+
#define XLOG_RUM_CREATE_PTREE 0x10
375375

376376
typedef struct rumxlogCreatePostingTree
377377
{
@@ -386,7 +386,7 @@ typedef struct rumxlogCreatePostingTree
386386
/* follows list of heap's ItemPointer */
387387
} rumxlogCreatePostingTree;
388388

389-
#define XLOG_GIN_INSERT 0x20
389+
#define XLOG_RUM_INSERT 0x20
390390

391391
typedef struct rumxlogInsert
392392
{
@@ -410,7 +410,7 @@ typedef struct rumxlogInsert
410410
*/
411411
} rumxlogInsert;
412412

413-
#define XLOG_GIN_SPLIT 0x30
413+
#define XLOG_RUM_SPLIT 0x30
414414

415415
typedef struct rumxlogSplit
416416
{
@@ -437,7 +437,7 @@ typedef struct rumxlogSplit
437437
/* follows: list of tuple or ItemPointerData or PostingItem */
438438
} rumxlogSplit;
439439

440-
#define XLOG_GIN_VACUUM_PAGE 0x40
440+
#define XLOG_RUM_VACUUM_PAGE 0x40
441441

442442
typedef struct rumxlogVacuumPage
443443
{
@@ -452,7 +452,7 @@ typedef struct rumxlogVacuumPage
452452
/* follows content of page */
453453
} rumxlogVacuumPage;
454454

455-
#define XLOG_GIN_DELETE_PAGE 0x50
455+
#define XLOG_RUM_DELETE_PAGE 0x50
456456

457457
typedef struct rumxlogDeletePage
458458
{
@@ -464,7 +464,7 @@ typedef struct rumxlogDeletePage
464464
BlockNumber rightLink;
465465
} rumxlogDeletePage;
466466

467-
#define XLOG_GIN_UPDATE_META_PAGE 0x60
467+
#define XLOG_RUM_UPDATE_META_PAGE 0x60
468468

469469
typedef struct rumxlogUpdateMeta
470470
{
@@ -478,7 +478,7 @@ typedef struct rumxlogUpdateMeta
478478
/* array of inserted tuples follows */
479479
} rumxlogUpdateMeta;
480480

481-
#define XLOG_GIN_INSERT_LISTPAGE 0x70
481+
#define XLOG_RUM_INSERT_LISTPAGE 0x70
482482

483483
typedef struct rumxlogInsertListPage
484484
{
@@ -489,7 +489,7 @@ typedef struct rumxlogInsertListPage
489489
/* array of inserted tuples follows */
490490
} rumxlogInsertListPage;
491491

492-
#define XLOG_GIN_DELETE_LISTPAGE 0x80
492+
#define XLOG_RUM_DELETE_LISTPAGE 0x80
493493

494494
#define RUM_NDELETE_AT_ONCE 16
495495
typedef struct rumxlogDeleteListPages
@@ -504,7 +504,7 @@ typedef struct rumxlogDeleteListPages
504504
/* rumutil.c */
505505
extern bytea *rumoptions(Datum reloptions, bool validate);
506506
extern Datum rumhandler(PG_FUNCTION_ARGS);
507-
extern void initGinState(RumState *state, Relation index);
507+
extern void initRumState(RumState *state, Relation index);
508508
extern Buffer RumNewBuffer(Relation index);
509509
extern void RumInitBuffer(Buffer b, uint32 f);
510510
extern void RumInitPage(Page page, uint32 f, Size pageSize);
@@ -601,7 +601,7 @@ extern RumBtreeStack *rumPrepareFindLeafPage(RumBtree btree, BlockNumber blkno);
601601
extern RumBtreeStack *rumFindLeafPage(RumBtree btree, RumBtreeStack *stack);
602602
extern RumBtreeStack *rumReFindLeafPage(RumBtree btree, RumBtreeStack *stack);
603603
extern Buffer rumStepRight(Buffer buffer, Relation index, int lockmode);
604-
extern void freeGinBtreeStack(RumBtreeStack *stack);
604+
extern void freeRumBtreeStack(RumBtreeStack *stack);
605605
extern void rumInsertValue(RumBtree btree, RumBtreeStack *stack,
606606
GinStatsData *buildStats);
607607
extern void rumFindParents(RumBtree btree, RumBtreeStack *stack, BlockNumber rootBlkno);

rumbtree.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ rumStepRight(Buffer buffer, Relation index, int lockmode)
227227
}
228228

229229
void
230-
freeGinBtreeStack(RumBtreeStack *stack)
230+
freeRumBtreeStack(RumBtreeStack *stack)
231231
{
232232
while (stack)
233233
{
@@ -344,7 +344,7 @@ rumFindParents(RumBtree btree, RumBtreeStack *stack,
344344
* During an index build, buildStats is non-null and the counters
345345
* it contains should be incremented as needed.
346346
*
347-
* NB: the passed-in stack is freed, as though by freeGinBtreeStack.
347+
* NB: the passed-in stack is freed, as though by freeRumBtreeStack.
348348
*/
349349
void
350350
rumInsertValue(RumBtree btree, RumBtreeStack *stack, GinStatsData *buildStats)
@@ -390,7 +390,7 @@ rumInsertValue(RumBtree btree, RumBtreeStack *stack, GinStatsData *buildStats)
390390
LockBuffer(stack->buffer, RUM_UNLOCK);
391391
END_CRIT_SECTION();
392392

393-
freeGinBtreeStack(stack);
393+
freeRumBtreeStack(stack);
394394

395395
return;
396396
}
@@ -465,7 +465,7 @@ rumInsertValue(RumBtree btree, RumBtreeStack *stack, GinStatsData *buildStats)
465465
LockBuffer(stack->buffer, RUM_UNLOCK);
466466
END_CRIT_SECTION();
467467

468-
freeGinBtreeStack(stack);
468+
freeRumBtreeStack(stack);
469469

470470
/* During index build, count the newly-added root page */
471471
if (buildStats)

rumdatapage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ rumInsertItemPointers(RumState *rumstate,
14051405
*/
14061406
gdi->btree.curitem++;
14071407
LockBuffer(gdi->stack->buffer, RUM_UNLOCK);
1408-
freeGinBtreeStack(gdi->stack);
1408+
freeRumBtreeStack(gdi->stack);
14091409
}
14101410
else
14111411
rumInsertValue(&(gdi->btree), gdi->stack, buildStats);

rumget.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ scanPostingTree(Relation index, RumScanEntry scanEntry,
150150
gdi = rumPrepareScanPostingTree(index, rootPostingTree, TRUE, attnum, rumstate);
151151

152152
buffer = rumScanBeginPostingTree(gdi);
153-
IncrBufferRefCount(buffer); /* prevent unpin in freeGinBtreeStack */
153+
IncrBufferRefCount(buffer); /* prevent unpin in freeRumBtreeStack */
154154

155-
freeGinBtreeStack(gdi->stack);
155+
freeRumBtreeStack(gdi->stack);
156156
pfree(gdi);
157157

158158
/*
@@ -449,7 +449,7 @@ startScanEntry(RumState *rumstate, RumScanEntry entry)
449449
entry->matchBitmap = NULL;
450450
}
451451
LockBuffer(stackEntry->buffer, RUM_UNLOCK);
452-
freeGinBtreeStack(stackEntry);
452+
freeRumBtreeStack(stackEntry);
453453
goto restartScanEntry;
454454
}
455455

@@ -494,7 +494,7 @@ startScanEntry(RumState *rumstate, RumScanEntry entry)
494494
/*
495495
* We keep buffer pinned because we need to prevent deletion of
496496
* page during scan. See RUM's vacuum implementation. RefCount is
497-
* increased to keep buffer pinned after freeGinBtreeStack() call.
497+
* increased to keep buffer pinned after freeRumBtreeStack() call.
498498
*/
499499
page = BufferGetPage(entry->buffer, NULL, NULL,
500500
BGP_NO_SNAPSHOT_TEST);
@@ -539,7 +539,7 @@ startScanEntry(RumState *rumstate, RumScanEntry entry)
539539

540540
if (needUnlock)
541541
LockBuffer(stackEntry->buffer, RUM_UNLOCK);
542-
freeGinBtreeStack(stackEntry);
542+
freeRumBtreeStack(stackEntry);
543543
}
544544

545545
static void

ruminsert.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ rumEntryInsert(RumState *rumstate,
491491

492492
/* release all stack */
493493
LockBuffer(stack->buffer, RUM_UNLOCK);
494-
freeGinBtreeStack(stack);
494+
freeRumBtreeStack(stack);
495495

496496
/* insert into posting tree */
497497
gdi = rumPrepareScanPostingTree(rumstate->index, rootPostingTree, FALSE, attnum, rumstate);
@@ -638,7 +638,7 @@ rumbuild(Relation heap, Relation index, struct IndexInfo *indexInfo)
638638
elog(ERROR, "index \"%s\" already contains data",
639639
RelationGetRelationName(index));
640640

641-
initGinState(&buildstate.rumstate, index);
641+
initRumState(&buildstate.rumstate, index);
642642
buildstate.indtuples = 0;
643643
memset(&buildstate.buildStats, 0, sizeof(GinStatsData));
644644

@@ -831,7 +831,7 @@ ruminsert(Relation index, Datum *values, bool *isnull,
831831

832832
oldCtx = MemoryContextSwitchTo(insertCtx);
833833

834-
initGinState(&rumstate, index);
834+
initRumState(&rumstate, index);
835835

836836
if (RumGetUseFastUpdate(index))
837837
{

rumscan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ rumbeginscan(Relation rel, int nkeys, int norderbys)
4141
ALLOCSET_DEFAULT_MINSIZE,
4242
ALLOCSET_DEFAULT_INITSIZE,
4343
ALLOCSET_DEFAULT_MAXSIZE);
44-
initGinState(&so->rumstate, scan->indexRelation);
44+
initRumState(&so->rumstate, scan->indexRelation);
4545

4646
scan->opaque = so;
4747

@@ -250,7 +250,7 @@ freeScanKeys(RumScanOpaque so)
250250

251251
if (entry->gdi)
252252
{
253-
freeGinBtreeStack(entry->gdi->stack);
253+
freeRumBtreeStack(entry->gdi->stack);
254254
pfree(entry->gdi);
255255
}
256256
else

rumutil.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ rumhandler(PG_FUNCTION_ARGS)
9191
}
9292

9393
/*
94-
* initGinState: fill in an empty RumState struct to describe the index
94+
* initRumState: fill in an empty RumState struct to describe the index
9595
*
9696
* Note: assorted subsidiary data is allocated in the CurrentMemoryContext.
9797
*/
9898
void
99-
initGinState(RumState *state, Relation index)
99+
initRumState(RumState *state, Relation index)
100100
{
101101
TupleDesc origTupdesc = RelationGetDescr(index);
102102
int i;

rumvacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ rumbulkdelete(IndexVacuumInfo *info,
727727
gvs.callback = callback;
728728
gvs.callback_state = callback_state;
729729
gvs.strategy = info->strategy;
730-
initGinState(&gvs.rumstate, index);
730+
initRumState(&gvs.rumstate, index);
731731

732732
/* first time through? */
733733
if (stats == NULL)
@@ -849,7 +849,7 @@ rumvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
849849
{
850850
if (IsAutoVacuumWorkerProcess())
851851
{
852-
initGinState(&rumstate, index);
852+
initRumState(&rumstate, index);
853853
rumInsertCleanup(&rumstate, true, stats);
854854
}
855855
return stats;
@@ -862,7 +862,7 @@ rumvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats)
862862
if (stats == NULL)
863863
{
864864
stats = (IndexBulkDeleteResult *) palloc0(sizeof(IndexBulkDeleteResult));
865-
initGinState(&rumstate, index);
865+
initRumState(&rumstate, index);
866866
rumInsertCleanup(&rumstate, true, stats);
867867
}
868868

0 commit comments

Comments
 (0)