Re: Add test module for Table Access Method - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add test module for Table Access Method
Date
Msg-id ZaYM4jR7lDS_A4Ii@paquier.xyz
Whole thread Raw
In response to Re: Add test module for Table Access Method  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Responses Re: Add test module for Table Access Method
List pgsql-hackers
On Mon, Jan 15, 2024 at 03:40:30PM +0100, Jelte Fennema-Nio wrote:
> On Mon, 15 Jan 2024 at 14:26, Aleksander Alekseev
> <aleksander@timescale.com> wrote:
>> To be fair, Postgres uses TAM internally, so there is at least one
>> complete and up-to-date real-life example.
>
> Sure, but that one is quite hard to follow if you don't already know
> lots of details of the heap storage. At least for me, having a minimal
> example was extremely helpful and it made for a great code skeleton to
> start from.

Hmm.  I'd rather have it do something useful in terms of test coverage
rather than being just an empty skull.

How about adding the same kind of coverage as dummy_index_am with a
couple of reloptions then?  That can serve as a point of reference
when a table AM needs a few custom options.  A second idea would be to
show how to use toast relations when implementing your new AM, where a
toast table could be created even in cases where we did not want one
with heap, when it comes to size limitations with char and/or varchar,
and that makes for a simpler needs_toast_table callback.
--
Michaxel

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Synchronizing slots from primary to standby
Next
From: Bharath Rupireddy
Date:
Subject: Re: introduce dynamic shared memory registry