pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Inefficiency in parallel pg_restore with many tables
Date: Fri, 1 Sep 2023 13:52:48 -0700
Message-ID: <20230901205248.GA3184752@nathanxps13> (raw)
In-Reply-To: <CA+TgmoYtJ+ad+ej=BCPWRNPyNoLy2R2O5wBSZUeyaQ54jrPk4A@mail.gmail.com>
References: <20230718045701.GA1090171@nathanxps13>
	<20230718160511.loirkf5fwjm5ut73@alvherre.pgsql>
	<20230718160713.GA1139177@nathanxps13>
	<20230720190644.GA1724613@nathanxps13>
	<20230722231941.GA2020225@nathanxps13>
	<1225141.1690069670@sss.pgh.pa.us>
	<20230723055703.GA2421212@nathanxps13>
	<20230724190015.GA2528613@nathanxps13>
	<20230725185336.GA2911441@nathanxps13>
	<CA+TgmoYtJ+ad+ej=BCPWRNPyNoLy2R2O5wBSZUeyaQ54jrPk4A@mail.gmail.com>

On Fri, Sep 01, 2023 at 04:00:44PM -0400, Robert Haas wrote:
> In hindsight, I think that making binaryheap depend on Datum was a bad
> idea. I think that was my idea, and I think it wasn't very smart.
> Considering that people have coded to that decision up until now, it
> might not be too easy to change at this point. But in principle I
> guess you'd want to be able to make a heap out of any C data type,
> rather than just Datum, or just Datum in the backend and just void *
> in the frontend.

Yeah, something similar to simplehash for binary heaps could be nice.  That
being said, I don't know if there's a strong reason to specialize the
implementation for a given C data type in most cases.  I suspect many
callers are just fine with dealing with pointers (e.g., I wouldn't store an
entire TocEntry in the array), and smaller types like integers are already
stored directly in the array thanks to the use of Datum.  However, it
_would_ allow us to abandon this frontend/backend void */Datum kludge,
which is something.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (37+ messages)  latest in thread

Message-ID: <20230901205248.GA3184752@nathanxps13>
Permalink:  ../20230901205248.GA3184752@nathanxps13/
Also on:    postgresql.org/message-id/20230901205248.GA3184752@nathanxps13

 · 

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: nathandbossart@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Inefficiency in parallel pg_restore with many tables
  In-Reply-To: <20230901205248.GA3184752@nathanxps13>

* 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