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

From Tom Lane
Subject Re: Inefficiency in parallel pg_restore with many tables
Date
Msg-id 3031359.1694649699@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inefficiency in parallel pg_restore with many tables  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Inefficiency in parallel pg_restore with many tables
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> Upon closer inspection, I found a rather nasty problem.  The qsort
> comparator expects a TocEntry **, but the binaryheap comparator expects a
> TocEntry *, and we simply pass the arguments through to the qsort
> comparator.  In v9, I added the requisite ampersands.

Ooops :-(

> I'm surprised this
> worked at all.

Probably it was not sorting things appropriately.  Might be worth adding
some test scaffolding to check that bigger tasks are chosen before
smaller ones.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Surely this code in setrefs.c is wrong?
Next
From: Andy Fan
Date:
Subject: Re: Redundant Unique plan node for table with a unique index