Re: MaxOffsetNumber for Table AMs - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MaxOffsetNumber for Table AMs
Date
Msg-id 3265182.1619795205@sss.pgh.pa.us
Whole thread Raw
In response to MaxOffsetNumber for Table AMs  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: MaxOffsetNumber for Table AMs  (Peter Geoghegan <pg@bowt.ie>)
Re: MaxOffsetNumber for Table AMs  (Jeff Davis <pgsql@j-davis.com>)
Re: MaxOffsetNumber for Table AMs  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> The notion of TID is based on pages and line pointers, which makes
> sense for heapam, but that's not likely to make sense for a custom
> table AM.
> The obvious answer is to make a simple mapping between a TID and
> whatever makes sense to the AM (for the sake of discussion, let's say a
> plain row number).

I'm inclined to think that when we get around to doing something
about this, we need to make a much bigger change than just poking
at the margins of type tid.

My thought at the moment is that all APIs above the AM level ought
to be redefined to use uint64 for tuple identifiers.  heapam and
related index AMs could map block + offset into that in some
convenient way, and other AMs could do what they like.

Andres seems to feel that we should try to allow variable-width
tupleids, but I'm afraid that the cost/benefit ratio for that
would be pretty poor.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_hba.conf.sample wording improvement
Next
From: Patrik Novotny
Date:
Subject: Re: Help needed with a reproducer for CVE-2020-25695 not based on REFRESH MATERIALIZED VIEW