pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: postgres_fdw batching vs. (re)creating the tuple slots
Date: Sun, 30 May 2021 19:17:11 -0400
Message-ID: <2433405.1622416631@sss.pgh.pa.us> (raw)
In-Reply-To: <20210530212616.5k5nxnbunwnwet2a@alap3.anarazel.de>
References: <ebbbcc7d-4286-8c28-0272-61b4753af761@enterprisedb.com>
	<20210530205831.vib4p7mt23cymhpc@alap3.anarazel.de>
	<2399204.1622409059@sss.pgh.pa.us>
	<20210530212616.5k5nxnbunwnwet2a@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> On 2021-05-30 17:10:59 -0400, Tom Lane wrote:
>> But it does seem like the hashing scheme somebody added to resowners
>> is a bit too simplistic.  It ought to be able to cope with lots of
>> refs to the same object, or at least not be extra-awful for that case.

> It's not really the hashing that's the problem, right? The array
> representation would have nearly the same problem, I think?

ResourceArrayAdd would have zero problem.  ResourceArrayRemove is
O(1) as long as resources are removed in reverse order ... which
is effectively true if they're all the same resource.  So while
I've not tested, I believe that this particular case would have
no issue at all with the old resowner implementation, stupid
though that was.

> It doesn't seem trivial to improve it without making resowner.c's
> representation a good bit more complicated.

Dunno, I have not studied the new version at all.

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <2433405.1622416631@sss.pgh.pa.us>
Permalink:  ../2433405.1622416631@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2433405.1622416631@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, andres@anarazel.de, tomas.vondra@enterprisedb.com
  Subject: Re: postgres_fdw batching vs. (re)creating the tuple slots
  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>

* 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