Re: Inefficiency in parallel pg_restore with many tables - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: Inefficiency in parallel pg_restore with many tables
Date
Msg-id 20230718160713.GA1139177@nathanxps13
Whole thread Raw
In response to Re: Inefficiency in parallel pg_restore with many tables  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Inefficiency in parallel pg_restore with many tables
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Inefficiency in parallel pg_restore with many tables
Next
From: "David G. Johnston"
Date:
Subject: Re: Regarding Installation of PostgreSQL