pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Inefficiency in parallel pg_restore with many tables
Date: Tue, 18 Jul 2023 09:07:13 -0700
Message-ID: <20230718160713.GA1139177@nathanxps13> (raw)
In-Reply-To: <20230718160511.loirkf5fwjm5ut73@alvherre.pgsql>
References: <20230718045701.GA1090171@nathanxps13>
	<20230718160511.loirkf5fwjm5ut73@alvherre.pgsql>

On Tue, Jul 18, 2023 at 06:05:11PM +0200, Alvaro Herrera wrote:
> On 2023-Jul-17, Nathan Bossart wrote:
> 
>> @@ -35,7 +42,11 @@ binaryheap_allocate(int capacity, binaryheap_comparator compare, void *arg)
>>  	binaryheap *heap;
>>  
>>  	sz = offsetof(binaryheap, bh_nodes) + sizeof(Datum) * capacity;
>> +#ifdef FRONTEND
>> +	heap = (binaryheap *) pg_malloc(sz);
>> +#else
>>  	heap = (binaryheap *) palloc(sz);
>> +#endif
> 
> Hmm, as I recall fe_memutils.c provides you with palloc() in the
> frontend environment, so you don't actually need this one.

Ah, yes it does.  Thanks for the pointer.

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





view thread (37+ messages)  latest in thread

Message-ID: <20230718160713.GA1139177@nathanxps13>
Permalink:  ../20230718160713.GA1139177@nathanxps13/
Also on:    postgresql.org/message-id/20230718160713.GA1139177@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, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, andrew@dunslane.net, pgsql-hackers@lists.postgresql.org
  Subject: Re: Inefficiency in parallel pg_restore with many tables
  In-Reply-To: <20230718160713.GA1139177@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