pg_dump File Inspector
A dump file does not say much about itself until pg_restore fails on it. This page reads the file header and table of contents in your browser, so you can see which pg_dump wrote the file, which server it came from, how it is compressed and what is inside. It also tells you which pg_restore versions can open it and what will go wrong on your target server. Files are read locally and never uploaded, and only the header and table of contents are kept in memory, so large dumps are fine.
Do more than pg_dump file inspector — meet Chat2DB
Chat2DB is an AI-powered SQL client for Windows, macOS and Linux. Write SQL in natural language, format and optimize queries automatically, and manage MySQL, PostgreSQL, Oracle and 20+ other databases in one workspace.
How to use
- Choose a dump file: custom format (.dump), tar, plain SQL, gzip-compressed SQL, or the toc.dat file from a directory-format dump.
- Select the PostgreSQL version you plan to restore into, so the report can check that server.
- Read the report. The contents section uses the same format as pg_restore -l, so you can save it, comment out lines and pass it to pg_restore -L.
Frequently asked questions
How do I find out which version created a pg_dump file?
Run pg_restore -l file.dump | head -12 on a custom or tar archive and read the Dumped from database version and Dumped by pg_dump version lines. A plain SQL dump has the same two lines as comments near the top of the file. If your pg_restore is too old to open the archive, this page reads the same header without it.
What does pg_restore unsupported version (1.16) in file header mean?
The archive was written by a newer pg_dump than your pg_restore understands. Archive version 1.15 needs pg_restore 16 or newer, and 1.16 needs pg_restore 17 or newer. Install a newer client. It can still connect to an older server, because the limit is on reading the file and not on the server you restore into.
Can I restore a pg_dump file into an older PostgreSQL version?
PostgreSQL does not support it, but it often works for simple schemas. Use a pg_restore new enough to read the file, and expect errors for anything the old server lacks. Dumps from pg_dump 17 and newer set transaction_timeout, which servers older than 17 reject. That error is harmless in a normal run, but it stops the restore under --exit-on-error or --single-transaction.
