Skip to content

Add -j option to db:restore to use multiple jobs to restore databases #52

@petitJAM

Description

@petitJAM

Like with #51, there's an option to speed up DB restores. Passing -j to pg_restore will cause it to use more than 1 process/thread for restoring a database. This is useful for large database dumps that take many minutes to restore.

From pg_restore --help:
-j, --jobs=NUM use this many parallel jobs to restore

This option could also potentially be automatically set to some number. This SO answer https://stackoverflow.com/a/6481016 has a way to check for the number of CPUs on the system. I don't know that we would want to use the max number since that might wreck the computer it's running on, but maybe half or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions