pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Ian Barwick <ian.barwick@enterprisedb.com>
To: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: tanghy.fnst@fujitsu.com, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: houzj.fnst@fujitsu.com
Subject: Re: Fast COPY FROM based on batch insert
Date: Mon, 11 Jul 2022 10:12:26 +0900
Message-ID: <4ad1dcea-0eef-6ad4-8314-589dbceeebc5@enterprisedb.com> (raw )
In-Reply-To: <b3a60e56-4d33-c2cb-3708-f234392be3a4@postgrespro.ru >
References: <TYAPR01MB2990B8451B4C725242E270F7FE979@TYAPR01MB2990.jpnprd01.prod.outlook.com >
<e3974716-e77b-9006-b1dc-dc00474d09c3@postgrespro.ru >
<TYAPR01MB29909FDCD92F5EEE68E37767FE649@TYAPR01MB2990.jpnprd01.prod.outlook.com >
<CALNJ-vRi4DjjkCmvmXWWtULzY6PSeEAC9vSpXVNHyVoGEQ8HVQ@mail.gmail.com >
<20210323032322.GW4203@telsasoft.com >
<TYAPR01MB2990124D4D859FE8C7E984C8FE649@TYAPR01MB2990.jpnprd01.prod.outlook.com >
<20210409004956.GN6592@telsasoft.com >
<CAPmGK15rVM+61WHZ3xS3zS6mq7293zCexVMYV4p3xoyTYo8FLg@mail.gmail.com >
<bc489202-9855-7550-d64c-ad2d83c24867@postgrespro.ru >
<CAPmGK15Z1kvZE0oULa+JD_CKzc4NwWEZYAfJ26VkoVYg1md63g@mail.gmail.com >
<45ad1b94-339b-a841-8885-67ebe6fc5bc1@postgrespro.ru >
<065fde84-f688-c411-28eb-a3b9084b38b7@enterprisedb.com >
<811b36f0-8888-7036-f4c5-0bfbdfad0bbf@postgrespro.ru >
<17be446f-65a5-b49e-e57c-5629431e26b1@enterprisedb.com >
<b3a60e56-4d33-c2cb-3708-f234392be3a4@postgrespro.ru >
On 09/07/2022 00:09, Andrey Lepikhov wrote:
> On 8/7/2022 05:12, Ian Barwick wrote:
>> ERROR: bind message supplies 0 parameters, but prepared statement "pgsql_fdw_prep_178" requires 6
>> CONTEXT: remote SQL command: INSERT INTO public.foo_part_1(t, v1, v2, v3, v4, v5) VALUES ($1, $2, $3, $4, $5, $6)
>> COPY foo, line 88160
> Thanks, I got it. MultiInsertBuffer are created on the first non-zero flush of tuples into the partition and isn't deleted from the buffers list until the end of COPY. And on a subsequent flush in the case of empty buffer we catch the error.
> Your fix is correct, but I want to propose slightly different change (see in attachment).
LGTM.
Regards
Ian Barwick
--
https://www.enterprisedb.com/
view thread (39+ messages) latest in thread
Message-ID: <4ad1dcea-0eef-6ad4-8314-589dbceeebc5@enterprisedb.com>
Permalink: ../4ad1dcea-0eef-6ad4-8314-589dbceeebc5@enterprisedb.com/
Also on: postgresql.org/message-id/4ad1dcea-0eef-6ad4-8314-589dbceeebc5@enterprisedb.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ian.barwick@enterprisedb.com, a.lepikhov@postgrespro.ru, pryzby@telsasoft.com, zyu@yugabyte.com, amitlangote09@gmail.com, ashutosh.bapat.oss@gmail.com, tomas.vondra@enterprisedb.com, etsuro.fujita@gmail.com, houzj.fnst@fujitsu.com
Subject: Re: Fast COPY FROM based on batch insert
In-Reply-To: <4ad1dcea-0eef-6ad4-8314-589dbceeebc5@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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