From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Luc Vlaming <luc(at)swarm64(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Paul Guo <guopa(at)vmware(dot)com>, Jeff Davis <pgsql(at)j-davis(dot)com> |
Subject: | Re: New Table Access Methods for Multi and Single Inserts |
Date: | 2021-02-17 07:16:25 |
Message-ID: | CALj2ACXoKTQuz8FKJxgB_=Jr_2_ZCy7gDteBrUa_5pd7Ov_1Tg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I addressed the following review comments and attaching v3 patch set.
1) ExecClearTuple happens before ExecCopySlot in heap_multi_insert_v2
and this allowed us to remove clear_mi_slots flag from
TableInsertState.
2) I retained the flushed variable inside TableInsertState so that the
callers can know whether the buffered slots have been flushed. If yes,
the callers can execute after insert row triggers or perform index
insertions. This is easier than passing the after insert row triggers
info and index info to new multi insert table am and let it do. This
way the functionalities can be kept separate i.e. multi insert ams do
only buffering, decisions on when to flush, insertions and the callers
will execute triggers or index insertions. And also none of the
existing table ams are performing these operations within them, so
this is inline with the current design of the table ams.
3) I have kept the single and multi insert API separate. The previous
suggestion was to have only a single insert API and let the callers
provide initially whether they want multi or single inserts. One
problem with that approach is that we have to allow table ams to
execute the after row triggers or index insertions. That is something
I personally don't like.
0001 - new table ams implementation
0002 - the new multi table ams used in CREATE TABLE AS and REFRESH
MATERIALIZED VIEW
0003 - the new multi table ams used in COPY
Please review the v3 patch set further.
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
v3-0001-New-Table-AMs-for-Multi-and-Single-Inserts.patch | application/x-patch | 19.4 KB |
v3-0002-CTAS-and-REFRESH-Mat-View-With-New-Multi-Insert-T.patch | application/x-patch | 6.0 KB |
v3-0003-COPY-With-New-Multi-and-Single-Insert-Table-AM.patch | application/x-patch | 22.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2021-02-17 08:48:08 | Re: A reloption for partitioned tables - parallel_workers |
Previous Message | Michael Paquier | 2021-02-17 07:04:01 | Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123 |