Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

pg_restore Finished, but a Table Is Missing: How to Find It

If pg_restore finished but a table is missing, check whether the archive contains it, whether restore options filtered it, and whether errors or the target schema explain the result.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A successful-looking pg_restore run does not prove that every intended table reached the database. PostgreSQL’s default is to continue after SQL errors and report an error count at the end, so first check the complete output and exit status. Then determine whether the table is in the archive, filtered out during restore, restored elsewhere, or skipped after an error.

Start with the restore output and the destination

Save the exact pg_restore command, the archive name and format, the complete standard output and error output, and the command’s exit status. A brief completion message can hide errors: by default, pg_restore continues after SQL errors and displays a count at the end. The PostgreSQL 18 pg_restore documentation describes this default and the --exit-on-error option, which stops the restore when an error occurs while sending SQL commands.

As an Amazon Associate I earn from qualifying purchases.

Also verify that your database session is connected to the intended database and that you are looking in the intended schema. A table restored under a different schema—or into a different database—can look absent if you check only one location.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check whether the archive contains the table

For a non-plain-text archive, list its contents and search for the exact schema-qualified table name:

pg_restore --list archive-file

The pg_restore documentation explains that --list displays archive contents and can produce a table-of-contents file used with --use-list. If the table has no entry in the listing, the restore could not restore that table from this archive. Investigate how the archive was created.

If the table is absent from the list

Review the original pg_dump command for table or schema selection and exclusion options. A dump may have intentionally included only selected objects or omitted a schema. PostgreSQL also cautions that when -t selects tables, pg_dump does not attempt to include other database objects those tables may depend on. See the PostgreSQL 18 pg_dump documentation.

If the archive was produced with filters, changing the restore command will not add an entry that was never dumped. You will need an archive that includes the table, or another suitable source for it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If the table is present in the list

Focus on what the restore selected and where it sent the objects. Check for --table, --schema, --exclude-schema, and --use-list, as well as --data-only or --schema-only. These options can limit which objects or parts of objects are restored. Compare the schema-qualified name in the archive listing with the database and schema you inspected.

Check whether a restore error skipped the table

Search the full output for errors involving the table or its dependencies, and note the final error count. A command that continued to the end may still have encountered a SQL error that prevented one object from being created. For a later diagnostic run, --exit-on-error can stop at the first SQL error instead of continuing, making the failing point easier to identify; use it only when you are prepared for a restore to stop before completing.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Restore selectively only after identifying the cause

Once you have confirmed the archive entry, intended destination, and relevant restore filters, you can plan a targeted restore. Be aware that pg_restore --table does not include subsidiary objects such as indexes just because it selected the table. Inspect the archive listing for the related entries you need and account for their restore order; the behavior is documented in pg_restore’s table-selection notes.

Do not add a destructive cleanup option such as --clean merely because a table is missing. First preserve the destination and a backup, and confirm exactly what would be dropped or replaced. The available facts do not establish why a particular restore omitted a table; the archive listing, commands, output, and destination checks are needed to distinguish the cases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.