I suggest you explore pg_dump --format=custom
and pg_restore -j 12
. The custom
format allows parallel recovery (and, if necessary, can be reset to raw SQL, so you wonβt lose any functionality here). The -j
pg_restore
to pg_restore
forces it to start recovery in parallel. This can provide substantial speed. Especially if you started your work_mem service to good and big.
It will not solve the problem that you asked for the reasons stated by Erwin above, and because it requires a level of knowledge about what is important to represent and what is not, which is simply not in the scheme. This is something that takes the developer's time and usually should be done at the same time that the circuit is built first.
source share