Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9168793

Browse files
committed
Fix comments related to table AMs
Incorrect function names were referenced. As this fixes some portionsof tableam.h, that is mentioned in the docs as something to look at whenimplementing a table AM, backpatch down to 12 where this has beenintroduced.Author: Hironobu SuzukiDiscussion:https://postgr.es/m/8fe6d672-28dd-3f1d-7aed-ac2f6d599d3f@interdb.jpBackpatch-through: 12
1 parenta742ecf commit9168793

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1639,9 +1639,9 @@ heap_get_latest_tid(TableScanDesc sscan,
16391639
TransactionIdpriorXmax;
16401640

16411641
/*
1642-
*table_get_latest_tid verified that the passed in tid is valid. Assume
1643-
* that t_ctid links are valid however - there shouldn't be invalid ones
1644-
* in the table.
1642+
*table_tuple_get_latest_tid() verified that the passed in tid is valid.
1643+
*Assumethat t_ctid links are valid however - there shouldn't be invalid
1644+
*onesin the table.
16451645
*/
16461646
Assert(ItemPointerIsValid(tid));
16471647

‎src/include/access/tableam.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,12 +1003,12 @@ table_index_fetch_end(struct IndexFetchTableData *scan)
10031003
* that tuple. Index AMs can use that to avoid returning that tid in future
10041004
* searches.
10051005
*
1006-
* The difference between this function andtable_fetch_row_version is that
1007-
* this function returns the currently visible version of a row if the AM
1008-
* supports storing multiple row versions reachable via a single index entry
1009-
* (like heap's HOT). Whereastable_fetch_row_version only evaluates the
1010-
* tuple exactly at `tid`. Outside of index entry ->table tuple lookups,
1011-
* table_tuple_fetch_row_version is what's usually needed.
1006+
* The difference between this function andtable_tuple_fetch_row_version()
1007+
*is thatthis function returns the currently visible version of a row if
1008+
*the AMsupports storing multiple row versions reachable via a single index
1009+
*entry(like heap's HOT). Whereastable_tuple_fetch_row_version() only
1010+
*evaluates thetuple exactly at `tid`. Outside of index entry ->table tuple
1011+
*lookups,table_tuple_fetch_row_version() is what's usually needed.
10121012
*/
10131013
staticinlinebool
10141014
table_index_fetch_tuple(structIndexFetchTableData*scan,
@@ -1062,8 +1062,9 @@ table_tuple_fetch_row_version(Relation rel,
10621062
/*
10631063
* Verify that `tid` is a potentially valid tuple identifier. That doesn't
10641064
* mean that the pointed to row needs to exist or be visible, but that
1065-
* attempting to fetch the row (e.g. with table_get_latest_tid() or
1066-
* table_fetch_row_version()) should not error out if called with that tid.
1065+
* attempting to fetch the row (e.g. with table_tuple_get_latest_tid() or
1066+
* table_tuple_fetch_row_version()) should not error out if called with that
1067+
* tid.
10671068
*
10681069
* `scan` needs to have been started via table_beginscan().
10691070
*/
@@ -1192,8 +1193,8 @@ table_tuple_complete_speculative(Relation rel, TupleTableSlot *slot,
11921193
/*
11931194
* Insert multiple tuples into a table.
11941195
*
1195-
* This is liketable_insert(), but inserts multiple tuples in one
1196-
* operation. That's often faster than callingtable_insert() in a loop,
1196+
* This is liketable_tuple_insert(), but inserts multiple tuples in one
1197+
* operation. That's often faster than callingtable_tuple_insert() in a loop,
11971198
* because e.g. the AM can reduce WAL logging and page locking overhead.
11981199
*
11991200
* Except for taking `nslots` tuples as input, and an array of TupleTableSlots

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp