Re: Inefficiency in parallel pg_restore with many tables
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>, pgsql-hackers@lists.postgresql.org
Date: 2023-07-22T23:28:15Z
Lists: pgsql-hackers
On Sat, Jul 22, 2023 at 04:19:41PM -0700, Nathan Bossart wrote: > In v3, I moved the Datum definitions to c.h. I first tried modifying > binaryheap to use "int" or "void *" instead, but that ended up requiring > some rather invasive changes in backend code, not to mention any extensions > that happen to be using it. I also looked into moving the definitions to a > separate datumdefs.h header that postgres.h would include, but that felt > awkward because 1) postgres.h clearly states that it is intended for things > "that never escape the backend" and 2) the definitions seem relatively > inexpensive. However, I think the latter option is still viable, so I'm > fine with switching to it if folks think that is a better approach. BTW we might be able to replace the open-coded heap in pg_dump_sort.c (added by 79273cc) with a binaryheap, too. -- 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