Re: Further pg_upgrade analysis for many tables
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Ants Aasma <ants@cybertec.at>, Jeff Janes <jeff.janes@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Magnus Hagander <magnus@hagander.net>, Andrew Dunstan <andrew@dunslane.net>
Date: 2012-11-27T00:05:13Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes: > Testing pg_dump for 4k tables (16 seconds) shows the first row is not > output by pg_dump until 15 seconds, meaning there can't be any > parallelism with a pipe. (Test script attached.) Does anyone know how > to get pg_dump to send some output earlier? You can't. By the time it knows what order to emit the objects in, it's done all the preliminary work you're griping about. (In a dump with data, there would be a meaningful amount of computation remaining, but not in a schema-only dump.) > I will now test using PRIMARY KEY and custom dump format with pg_restore > --jobs to see if I can get parallelism that way. This seems likely to be a waste of effort for the same reason: you only get meaningful parallelism when there's a substantial data component to be restored. regards, tom lane