mirror of
https://github.com/postgres/postgres.git
synced 2025-05-09 18:21:05 +03:00
Fix some typos and inconsistencies in tableam.h
The defined callback definitions have been using references to heap for a couple of variables and comments. This makes the whole interface more consistent by using "table" which is more generic. A variable storing index information was misspelled as well. Author: Michael Paquier Discussion: https://postgr.es/m/20190601190946.GB1905@paquier.xyz
This commit is contained in:
parent
2cd4e83570
commit
041a2642e5
@ -470,8 +470,8 @@ typedef struct TableAmRoutine
|
|||||||
const RelFileNode *newrnode);
|
const RelFileNode *newrnode);
|
||||||
|
|
||||||
/* See table_relation_copy_for_cluster() */
|
/* See table_relation_copy_for_cluster() */
|
||||||
void (*relation_copy_for_cluster) (Relation NewHeap,
|
void (*relation_copy_for_cluster) (Relation NewTable,
|
||||||
Relation OldHeap,
|
Relation OldTable,
|
||||||
Relation OldIndex,
|
Relation OldIndex,
|
||||||
bool use_sort,
|
bool use_sort,
|
||||||
TransactionId OldestXmin,
|
TransactionId OldestXmin,
|
||||||
@ -536,9 +536,9 @@ typedef struct TableAmRoutine
|
|||||||
TupleTableSlot *slot);
|
TupleTableSlot *slot);
|
||||||
|
|
||||||
/* see table_index_build_range_scan for reference about parameters */
|
/* see table_index_build_range_scan for reference about parameters */
|
||||||
double (*index_build_range_scan) (Relation heap_rel,
|
double (*index_build_range_scan) (Relation table_rel,
|
||||||
Relation index_rel,
|
Relation index_rel,
|
||||||
struct IndexInfo *index_nfo,
|
struct IndexInfo *index_info,
|
||||||
bool allow_sync,
|
bool allow_sync,
|
||||||
bool anyvisible,
|
bool anyvisible,
|
||||||
bool progress,
|
bool progress,
|
||||||
@ -549,7 +549,7 @@ typedef struct TableAmRoutine
|
|||||||
TableScanDesc scan);
|
TableScanDesc scan);
|
||||||
|
|
||||||
/* see table_index_validate_scan for reference about parameters */
|
/* see table_index_validate_scan for reference about parameters */
|
||||||
void (*index_validate_scan) (Relation heap_rel,
|
void (*index_validate_scan) (Relation table_rel,
|
||||||
Relation index_rel,
|
Relation index_rel,
|
||||||
struct IndexInfo *index_info,
|
struct IndexInfo *index_info,
|
||||||
Snapshot snapshot,
|
Snapshot snapshot,
|
||||||
@ -1377,7 +1377,7 @@ table_relation_copy_data(Relation rel, const RelFileNode *newrnode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy data from `OldHeap` into `NewHeap`, as part of a CLUSTER or VACUUM
|
* Copy data from `OldTable` into `NewTable`, as part of a CLUSTER or VACUUM
|
||||||
* FULL.
|
* FULL.
|
||||||
*
|
*
|
||||||
* Additional Input parameters:
|
* Additional Input parameters:
|
||||||
@ -1398,7 +1398,7 @@ table_relation_copy_data(Relation rel, const RelFileNode *newrnode)
|
|||||||
* - *tups_recently_dead - stats, for logging, if appropriate for AM
|
* - *tups_recently_dead - stats, for logging, if appropriate for AM
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
table_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
|
table_relation_copy_for_cluster(Relation OldTable, Relation NewTable,
|
||||||
Relation OldIndex,
|
Relation OldIndex,
|
||||||
bool use_sort,
|
bool use_sort,
|
||||||
TransactionId OldestXmin,
|
TransactionId OldestXmin,
|
||||||
@ -1408,11 +1408,11 @@ table_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap,
|
|||||||
double *tups_vacuumed,
|
double *tups_vacuumed,
|
||||||
double *tups_recently_dead)
|
double *tups_recently_dead)
|
||||||
{
|
{
|
||||||
OldHeap->rd_tableam->relation_copy_for_cluster(OldHeap, NewHeap, OldIndex,
|
OldTable->rd_tableam->relation_copy_for_cluster(OldTable, NewTable, OldIndex,
|
||||||
use_sort, OldestXmin,
|
use_sort, OldestXmin,
|
||||||
xid_cutoff, multi_cutoff,
|
xid_cutoff, multi_cutoff,
|
||||||
num_tuples, tups_vacuumed,
|
num_tuples, tups_vacuumed,
|
||||||
tups_recently_dead);
|
tups_recently_dead);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1473,7 +1473,7 @@ table_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin,
|
|||||||
* table_index_build_scan - scan the table to find tuples to be indexed
|
* table_index_build_scan - scan the table to find tuples to be indexed
|
||||||
*
|
*
|
||||||
* This is called back from an access-method-specific index build procedure
|
* This is called back from an access-method-specific index build procedure
|
||||||
* after the AM has done whatever setup it needs. The parent heap relation
|
* after the AM has done whatever setup it needs. The parent table relation
|
||||||
* is scanned to find tuples that should be entered into the index. Each
|
* is scanned to find tuples that should be entered into the index. Each
|
||||||
* such tuple is passed to the AM's callback routine, which does the right
|
* such tuple is passed to the AM's callback routine, which does the right
|
||||||
* things to add it to the new index. After we return, the AM's index
|
* things to add it to the new index. After we return, the AM's index
|
||||||
@ -1497,26 +1497,26 @@ table_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin,
|
|||||||
* for other AMs later.
|
* for other AMs later.
|
||||||
*/
|
*/
|
||||||
static inline double
|
static inline double
|
||||||
table_index_build_scan(Relation heap_rel,
|
table_index_build_scan(Relation table_rel,
|
||||||
Relation index_rel,
|
Relation index_rel,
|
||||||
struct IndexInfo *index_nfo,
|
struct IndexInfo *index_info,
|
||||||
bool allow_sync,
|
bool allow_sync,
|
||||||
bool progress,
|
bool progress,
|
||||||
IndexBuildCallback callback,
|
IndexBuildCallback callback,
|
||||||
void *callback_state,
|
void *callback_state,
|
||||||
TableScanDesc scan)
|
TableScanDesc scan)
|
||||||
{
|
{
|
||||||
return heap_rel->rd_tableam->index_build_range_scan(heap_rel,
|
return table_rel->rd_tableam->index_build_range_scan(table_rel,
|
||||||
index_rel,
|
index_rel,
|
||||||
index_nfo,
|
index_info,
|
||||||
allow_sync,
|
allow_sync,
|
||||||
false,
|
false,
|
||||||
progress,
|
progress,
|
||||||
0,
|
0,
|
||||||
InvalidBlockNumber,
|
InvalidBlockNumber,
|
||||||
callback,
|
callback,
|
||||||
callback_state,
|
callback_state,
|
||||||
scan);
|
scan);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1530,9 +1530,9 @@ table_index_build_scan(Relation heap_rel,
|
|||||||
* transactions that are still in progress.
|
* transactions that are still in progress.
|
||||||
*/
|
*/
|
||||||
static inline double
|
static inline double
|
||||||
table_index_build_range_scan(Relation heap_rel,
|
table_index_build_range_scan(Relation table_rel,
|
||||||
Relation index_rel,
|
Relation index_rel,
|
||||||
struct IndexInfo *index_nfo,
|
struct IndexInfo *index_info,
|
||||||
bool allow_sync,
|
bool allow_sync,
|
||||||
bool anyvisible,
|
bool anyvisible,
|
||||||
bool progress,
|
bool progress,
|
||||||
@ -1542,17 +1542,17 @@ table_index_build_range_scan(Relation heap_rel,
|
|||||||
void *callback_state,
|
void *callback_state,
|
||||||
TableScanDesc scan)
|
TableScanDesc scan)
|
||||||
{
|
{
|
||||||
return heap_rel->rd_tableam->index_build_range_scan(heap_rel,
|
return table_rel->rd_tableam->index_build_range_scan(table_rel,
|
||||||
index_rel,
|
index_rel,
|
||||||
index_nfo,
|
index_info,
|
||||||
allow_sync,
|
allow_sync,
|
||||||
anyvisible,
|
anyvisible,
|
||||||
progress,
|
progress,
|
||||||
start_blockno,
|
start_blockno,
|
||||||
numblocks,
|
numblocks,
|
||||||
callback,
|
callback,
|
||||||
callback_state,
|
callback_state,
|
||||||
scan);
|
scan);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1561,17 +1561,17 @@ table_index_build_range_scan(Relation heap_rel,
|
|||||||
* See validate_index() for an explanation.
|
* See validate_index() for an explanation.
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
table_index_validate_scan(Relation heap_rel,
|
table_index_validate_scan(Relation table_rel,
|
||||||
Relation index_rel,
|
Relation index_rel,
|
||||||
struct IndexInfo *index_info,
|
struct IndexInfo *index_info,
|
||||||
Snapshot snapshot,
|
Snapshot snapshot,
|
||||||
struct ValidateIndexState *state)
|
struct ValidateIndexState *state)
|
||||||
{
|
{
|
||||||
heap_rel->rd_tableam->index_validate_scan(heap_rel,
|
table_rel->rd_tableam->index_validate_scan(table_rel,
|
||||||
index_rel,
|
index_rel,
|
||||||
index_info,
|
index_info,
|
||||||
snapshot,
|
snapshot,
|
||||||
state);
|
state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user