Re: Inefficiency in parallel pg_restore with many tables
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@lists.postgresql.org
Date: 2023-07-24T19:00:15Z
Lists: pgsql-hackers
Attachments
- v5-0001-make-binaryheap-available-to-frontend.patch (text/x-diff)
On Sat, Jul 22, 2023 at 10:57:03PM -0700, Nathan Bossart wrote: > On Sat, Jul 22, 2023 at 07:47:50PM -0400, Tom Lane wrote: >> I wonder whether we can't provide some alternate definition or "skin" >> for binaryheap that preserves the Datum API for backend code that wants >> that, while providing a void *-based API for frontend code to use. > > I can give this a try next, but it might be rather #ifdef-heavy. Here is a sketch of this approach. It required fewer #ifdefs than I was expecting. At the moment, this one seems like the winner to me. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Remove open-coded binary heap in pg_dump_sort.c.
- 559bc1732180 17.0 landed
-
Convert pg_restore's ready_list to a priority queue.
- 9bfd44bbde42 17.0 landed
-
Add function for removing arbitrary nodes in binaryheap.
- c103d073819a 17.0 landed
-
Make binaryheap available to frontend code.
- 5af0263afd7b 17.0 landed