Skip to content

pgschema dump is really slow on my machine #285

@marcintustin

Description

@marcintustin
~/dev/repos/clientdatamart 🌳BVGS-1741$ pgschema --debug dump --host host.co --db dib --user marcintustin --schema public --file schemas/public/main.sql --multi-file
time=2026-02-10T14:25:17.379-05:00 level=DEBUG msg="Attempting database connection" host=host.co port=5432 database=dib user=marcintustin sslmode=prefer application_name=pgschema
time=2026-02-10T14:25:17.896-05:00 level=DEBUG msg="Database connection established successfully"

This hangs. I can see that all queries are idle. The last queries were GetAggregatesForSchema and select rolname from pg_roles where oid=$1;

Some kind of very verbose logging mode might help diagnose this. Please?!

Edit: Most recent attempt succeeded after 8 minutes.
Edit 2: Using v1.7.0.
Edit 3: Maybe some option to capture profile data using pprof?
Edit 4: using v.1.6.1 it took 8m26.446s (real) so this isn't a performance regression in the most recent version. I can only assume that IT have found a way to make this really slow in the name of security.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions