pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: postgres_fdw batching vs. (re)creating the tuple slots
Date: Fri, 4 Jun 2021 13:48:13 +0200
Message-ID: <a3233163-829d-94a0-7ca0-87bdfde92c90@enterprisedb.com> (raw)
In-Reply-To: <2433405.1622416631@sss.pgh.pa.us>
References: <ebbbcc7d-4286-8c28-0272-61b4753af761@enterprisedb.com>
	<20210530205831.vib4p7mt23cymhpc@alap3.anarazel.de>
	<2399204.1622409059@sss.pgh.pa.us>
	<20210530212616.5k5nxnbunwnwet2a@alap3.anarazel.de>
	<2433405.1622416631@sss.pgh.pa.us>

Hi,

Here's two WIP patches that fixes the regression for me. The first part
is from [1], so make large batches work, 0002 just creates a copy of the
tupledesc to not cause issues in resource owner, 0003 ensures we only
initialize the slots once (not per batch).

With the patches applied, the timings look like this:

 batch          timing
 ----------------------
     1    64194.942 ms
    10     7233.785 ms
   100     2244.255 ms
   32k     1372.175 ms

which seems fine. I still need to get this properly tested etc. and make
sure nothing is left over.

regards


[1]
https://postgr.es/m/OS0PR01MB571603973C0AC2874AD6BF2594299%40OS0PR01MB5716.jpnprd01.prod.outlook.com

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





view thread (15+ messages)  latest in thread

Message-ID: <a3233163-829d-94a0-7ca0-87bdfde92c90@enterprisedb.com>
Permalink:  ../a3233163-829d-94a0-7ca0-87bdfde92c90@enterprisedb.com/
Also on:    postgresql.org/message-id/a3233163-829d-94a0-7ca0-87bdfde92c90@enterprisedb.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@enterprisedb.com, tgl@sss.pgh.pa.us, andres@anarazel.de
  Subject: Re: postgres_fdw batching vs. (re)creating the tuple slots
  In-Reply-To: <a3233163-829d-94a0-7ca0-87bdfde92c90@enterprisedb.com>
  References: <ebbbcc7d-4286-8c28-0272-61b4753af761@enterprisedb.com> <20210530205831.vib4p7mt23cymhpc@alap3.anarazel.de> <2399204.1622409059@sss.pgh.pa.us> <20210530212616.5k5nxnbunwnwet2a@alap3.anarazel.de> <2433405.1622416631@sss.pgh.pa.us> <a3233163-829d-94a0-7ca0-87bdfde92c90@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