pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedEditing errors in the comments of tableam.h and heapam.c
3+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2020-07-14 9168793d72 9678c08184 330410ecad Fix comments related to table AMs
* Editing errors in the comments of tableam.h and heapam.c
@ 2020-07-13 12:25 Hironobu SUZUKI <hironobu@interdb.jp>
2020-07-13 12:52 ` Re: Editing errors in the comments of tableam.h and heapam.c Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Hironobu SUZUKI @ 2020-07-13 12:25 UTC (permalink / raw)
To: pgsql-hackers@lists.postgresql.org
Hi,
Some comments in tableam.h and heapam.c contain three old function names
although these have been renamed by this commit
73b8c3bd2889fed986044e15aefd0911f96ccdd3.
Old: table_insert, table_fetch_row_version, table_get_latest_tid.
New: table_tuple_insert, table_tuple_fetch_row_version,
table_tuple_get_latest_tid.
I think these are editing errors. PG 12 also has the same errors.
Best regards,
Attachments:
editing-errors-correction-in-tableam-h-and-heapam-c.patch (text/plain, 2.8K) download
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 7bd45703aa..5a0d5f9d27 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -1639,9 +1639,9 @@ heap_get_latest_tid(TableScanDesc sscan,
TransactionId priorXmax;
/*
- * table_get_latest_tid verified that the passed in tid is valid. Assume
- * that t_ctid links are valid however - there shouldn't be invalid ones
- * in the table.
+ * table_tuple_get_latest_tid verified that the passed in tid is valid.
+ * Assume that t_ctid links are valid however - there shouldn't be invalid
+ * ones in the table.
*/
Assert(ItemPointerIsValid(tid));
diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index b3d2a6dd31..2fead15ecf 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -1003,10 +1003,10 @@ table_index_fetch_end(struct IndexFetchTableData *scan)
* that tuple. Index AMs can use that to avoid returning that tid in future
* searches.
*
- * The difference between this function and table_fetch_row_version is that
+ * The difference between this function and table_tuple_fetch_row_version is that
* this function returns the currently visible version of a row if the AM
* supports storing multiple row versions reachable via a single index entry
- * (like heap's HOT). Whereas table_fetch_row_version only evaluates the
+ * (like heap's HOT). Whereas table_tuple_fetch_row_version only evaluates the
* tuple exactly at `tid`. Outside of index entry ->table tuple lookups,
* table_tuple_fetch_row_version is what's usually needed.
*/
@@ -1062,8 +1062,8 @@ table_tuple_fetch_row_version(Relation rel,
/*
* Verify that `tid` is a potentially valid tuple identifier. That doesn't
* mean that the pointed to row needs to exist or be visible, but that
- * attempting to fetch the row (e.g. with table_get_latest_tid() or
- * table_fetch_row_version()) should not error out if called with that tid.
+ * attempting to fetch the row (e.g. with table_tuple_get_latest_tid() or
+ * table_tuple_fetch_row_version()) should not error out if called with that tid.
*
* `scan` needs to have been started via table_beginscan().
*/
@@ -1192,8 +1192,8 @@ table_tuple_complete_speculative(Relation rel, TupleTableSlot *slot,
/*
* Insert multiple tuples into a table.
*
- * This is like table_insert(), but inserts multiple tuples in one
- * operation. That's often faster than calling table_insert() in a loop,
+ * This is like table_tuple_insert(), but inserts multiple tuples in one
+ * operation. That's often faster than calling table_tuple_insert() in a loop,
* because e.g. the AM can reduce WAL logging and page locking overhead.
*
* Except for taking `nslots` tuples as input, and an array of TupleTableSlots
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Editing errors in the comments of tableam.h and heapam.c
2020-07-13 12:25 Editing errors in the comments of tableam.h and heapam.c Hironobu SUZUKI <hironobu@interdb.jp>
@ 2020-07-13 12:52 ` Michael Paquier <michael@paquier.xyz>
2020-07-14 04:21 ` Re: Editing errors in the comments of tableam.h and heapam.c Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Michael Paquier @ 2020-07-13 12:52 UTC (permalink / raw)
To: Hironobu SUZUKI <hironobu@interdb.jp>; +Cc: pgsql-hackers@lists.postgresql.org
On Mon, Jul 13, 2020 at 02:25:39PM +0200, Hironobu SUZUKI wrote:
> Some comments in tableam.h and heapam.c contain three old function names
> although these have been renamed by this commit
> 73b8c3bd2889fed986044e15aefd0911f96ccdd3.
>
> Old: table_insert, table_fetch_row_version, table_get_latest_tid.
>
> New: table_tuple_insert, table_tuple_fetch_row_version,
> table_tuple_get_latest_tid.
Thanks. That looks right.
> I think these are editing errors. PG 12 also has the same errors.
Yeah. We also recommend to look at tableam.h in the docs, so while
usually I just bother fixing comments on HEAD, it would be better to
back-patch this one.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Editing errors in the comments of tableam.h and heapam.c
2020-07-13 12:25 Editing errors in the comments of tableam.h and heapam.c Hironobu SUZUKI <hironobu@interdb.jp>
2020-07-13 12:52 ` Re: Editing errors in the comments of tableam.h and heapam.c Michael Paquier <michael@paquier.xyz>
@ 2020-07-14 04:21 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2020-07-14 04:21 UTC (permalink / raw)
To: Hironobu SUZUKI <hironobu@interdb.jp>; +Cc: pgsql-hackers@lists.postgresql.org
On Mon, Jul 13, 2020 at 09:52:12PM +0900, Michael Paquier wrote:
> Yeah. We also recommend to look at tableam.h in the docs, so while
> usually I just bother fixing comments on HEAD, it would be better to
> back-patch this one.
Committed and back-patched down to 12. Thanks, Suzuki-san.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2020-07-14 04:21 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 12:25 Editing errors in the comments of tableam.h and heapam.c Hironobu SUZUKI <hironobu@interdb.jp>
2020-07-13 12:52 ` Michael Paquier <michael@paquier.xyz>
2020-07-14 04:21 ` Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox