From: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
---|---|
To: | Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> |
Cc: | Japin Li <japinli(at)hotmail(dot)com>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Table AM Interface Enhancements |
Date: | 2024-03-28 13:26:07 |
Message-ID: | CAPpHfdvz22sHkg7VpFB-XN1eZN6VfBY6mJc7zNa4aHZw+RqRXg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Pavel!
Revised patchset is attached.
On Thu, Mar 28, 2024 at 3:12 PM Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com> wrote:
> The other extensibility that seems quite clear and uncontroversial to me is 0006.
>
> It simply shifts the decision on whether tuple inserts should invoke inserts to the related indices to the table am level. It doesn't change the current heap insert behavior so it's safe for the existing heap access method. But new table access methods could redefine this (only for tables created with these am's) and make index inserts independently of ExecInsertIndexTuples inside their own implementations of tuple_insert/tuple_multi_insert methods.
>
> I'd propose changing the comment:
>
> 1405 * This function sets `*insert_indexes` to true if expects caller to return
> 1406 * the relevant index tuples. If `*insert_indexes` is set to false, then
> 1407 * this function cares about indexes itself.
>
> in the following way
>
> Tableam implementation of tuple_insert should set `*insert_indexes` to true
> if it expects the caller to insert the relevant index tuples (as in heap
> implementation). It should set `*insert_indexes` to false if it cares
> about index inserts itself and doesn't want the caller to do index inserts.
Changed as you proposed.
> Maybe, a commit message is also better to reformulate to describe better who should do what.
Done.
Also, I removed extra includes in 0001 as you proposed and edited the
commit message in 0002.
> I think, with rebase and correction in the comments/commit message patch 0006 is ready to be committed.
I'm going to push 0001, 0002 and 0006 if no objections.
------
Regards,
Alexander Korotkov
Attachment | Content-Type | Size |
---|---|---|
0002-Custom-reloptions-for-table-AM-v7.patch | application/octet-stream | 13.2 KB |
0003-Generalize-table-AM-API-for-INSERT-.-ON-CONFLICT-v7.patch | application/octet-stream | 27.5 KB |
0001-Generalize-relation-analyze-in-table-AM-interface-v7.patch | application/octet-stream | 18.7 KB |
0005-Notify-table-AM-about-index-creation-v7.patch | application/octet-stream | 6.6 KB |
0004-Let-table-AM-override-reloptions-for-indexes-buil-v7.patch | application/octet-stream | 6.5 KB |
0006-Let-table-AM-insertion-methods-control-index-inse-v7.patch | application/octet-stream | 14.0 KB |
0007-Introduce-RowRefType-which-describes-the-table-ro-v7.patch | application/octet-stream | 21.6 KB |
0008-Introduce-RowID-bytea-tuple-identifier-v7.patch | application/octet-stream | 69.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2024-03-28 13:54:57 | Re: POC, WIP: OR-clause support for indexes |
Previous Message | Pavel Borisov | 2024-03-28 13:12:20 | Re: Table AM Interface Enhancements |