public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tomas Vondra <[email protected]>
To: Tom Lane <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: [email protected] <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Fdw batch insert error out when set batch_size > 65535
Date: Sat, 12 Jun 2021 00:39:02 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <OS0PR01MB571603973C0AC2874AD6BF2594299@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<OS0PR01MB57160ADFD5010254C8D1CE6594259@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<CALj2ACVvrd6LGga6UzOu17GzW0cmaS-F30KMBSxKsA+Zw8Z=BQ@mail.gmail.com>
	<CALj2ACXBJ3a7MLbCAGA=5dneYsD720KPp1Pot-kKVM1YFPkESA@mail.gmail.com>
	<[email protected]>
	<CALj2ACXq8a=FdrPDa=_wMrvOwcZjrNfCdeyfG-2dt17LyBEc=g@mail.gmail.com>
	<OS0PR01MB571674E988B480E82066EA7794239@OS0PR01MB5716.jpnprd01.prod.outlook.com>
	<[email protected]>
	<CALj2ACUxf+PRaTVPEY-pV_nNgsB0_U2uU3u8GqMKcF-6M2exjw@mail.gmail.com>
	<[email protected]>
	<CALj2ACXoxbNhpKx2r29OyBdx+fA51Xsv80B-9-xyp1CeBL3ckQ@mail.gmail.com>
	<1! [email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>



On 6/9/21 4:05 PM, Tomas Vondra wrote:
> On 6/9/21 3:28 PM, Tom Lane wrote:
>> Tomas Vondra <[email protected]> writes:
>>> Note that the problem here is [1] - we're creating a lot of slots
>>> referencing the same tuple descriptor, which inflates the duration.
>>> There's a fix in the other thread, which eliminates ~99% of the
>>> overhead. I plan to push that fix soon (a day or two).
>>
>> Oh, okay, as long as there's a plan to bring the time back down.
>>
> 
> Yeah. Sorry for not mentioning this in the original message about the
> new regression test.
> 

I've pushed a fix addressing the performance issue.

There's one caveat, though - for regular builds the slowdown is pretty
much eliminated. But with valgrind it's still considerably slower. For
postgres_fdw the "make check" used to take ~5 minutes for me, now it
takes >1h. And yes, this is entirely due to the new test case which is
generating / inserting 70k rows. So maybe the test case is not worth it
after all, and we should get rid of it.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company





view thread (29+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Fdw batch insert error out when set batch_size > 65535
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox