{"schema": "pgtrue.report/1", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630", "published": "2026-10-20T03:40:59Z", "publisher": "PostgresAI", "article": {"title": "PostgreSQL pg_dump and pg_restore utility", "url": "https://docs.aws.amazon.com/dms/latest/sbs/chap-manageddatabases.postgresql-rds-postgresql-full-load-pd_dump.html", "author": "Not stated", "publisher": "AWS Database Migration Service documentation"}, "grade": "D+", "axes": [{"axis": "Factual", "summary": "A \u00b7 0 wrong of 12 checked \u00b7 0 caveats \u00b7 partly assessed"}, {"axis": "Applicable", "summary": "A \u00b7 0 wrong of 4 checked \u00b7 0 caveats"}, {"axis": "Consistent", "summary": "B+ \u00b7 1 wrong of 12 checked \u00b7 0 caveats"}, {"axis": "Transparent", "summary": "A \u00b7 0 wrong of 5 checked \u00b7 0 caveats"}, {"axis": "Safe", "summary": "D \u00b7 1 wrong of 12 checked \u00b7 0 caveats"}], "findings": [{"anchor": "F2", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F2", "claim": "\u2026pg_dumpall -U <username> -h <hostname> -f <dumpfilelocation.sql> --no-role-passwords -g\u2026", "title": "Role migration omits the password assignment required for password authentication", "explanation": "Newly restored roles cannot authenticate with passwords until someone assigns passwords. src/bin/pg_dump/pg_dumpall.c:978-982 omits PASSWORD when --no-role-passwords is set. doc/src/sgml/ref/pg_dumpall.sgml:466-468 documents the resulting null passwords. The migration recipe includes no password assignment before application cutover.", "verdict": "Dangerous", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dumpall.c#L978-L982", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dumpall.c:978-982"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_dumpall.sgml#L466-L468", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_dumpall.sgml:466-468"}]}, {"anchor": "F1", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F1", "claim": "(Optional) Migrate database roles and users.", "title": "Missing roles must precede the database restore", "explanation": "Creating roles after pg_restore does not repair failed ownership changes or grants. doc/src/sgml/backup.sgml:135-138 requires referenced users before restoration. src/bin/pg_dump/pg_backup_archiver.c:4118-4120 emits ownership changes during restoration. The article's order requires additional repairs when source roles do not already exist.", "verdict": "Misleading", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/backup.sgml#L135-L138", "label": "REL_18_6 \u00b7 doc/src/sgml/backup.sgml:135-138"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_backup_archiver.c#L4118-L4120", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_backup_archiver.c:4118-4120"}]}, {"anchor": "F4", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F4", "claim": "\u2026-Fc: Sets the output as a custom-format archive\u2026", "title": "The custom archive supports pg_restore", "explanation": "-Fc creates a custom archive suitable for pg_restore. doc/src/sgml/ref/pg_dump.sgml:330-331 states this behavior. doc/src/sgml/ref/pg_restore.sgml:293-296 permits custom archives for parallel restoration from regular files.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_dump.sgml#L330-L331", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_dump.sgml:330-331"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_restore.sgml#L293-L296", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_restore.sgml:293-296"}]}, {"anchor": "F5", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F5", "claim": "\u2026Dump only global objects\u2026", "title": "pg_dumpall -g restricts the export to global objects", "explanation": "pg_dumpall -g exports global objects without database dumps. doc/src/sgml/ref/pg_dumpall.sgml:143 gives the same description. The command can include tablespaces as well as roles.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_dumpall.sgml#L143-L143", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_dumpall.sgml:143-143"}]}, {"anchor": "F6", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F6", "claim": "\u2026create database migrated_database;\u2026", "title": "CREATE DATABASE creates the named destination", "explanation": "CREATE DATABASE migrated_database creates the named database when privileges and server conditions permit it. doc/src/sgml/ref/create_database.sgml:49-50 confirms the command's purpose.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/create_database.sgml#L49-L50", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/create_database.sgml:49-50"}]}, {"anchor": "F7", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F7", "claim": "-b: Include large objects in the dump.", "title": "pg_dump -b requests large objects", "explanation": "pg_dump -b enables large-object output. src/bin/pg_dump/pg_dump.c:575-577 sets outputLOs to true when parsing -b.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dump.c#L575-L577", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dump.c:575-577"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dump.c#L1286-L1286", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dump.c:1286-1286"}]}, {"anchor": "F8", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F8", "claim": "You can find this utility as part of the database installation.", "title": "The standard installation includes the dump utilities", "explanation": "PostgreSQL installs pg_dump, pg_restore, and pg_dumpall. The install target lists all three in src/bin/pg_dump/Makefile:57.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/Makefile#L57-L60", "label": "REL_18_6 \u00b7 src/bin/pg_dump/Makefile:57-60"}]}, {"anchor": "F9", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F9", "claim": "\u2026reproduce the original database object definitions and table data\u2026", "title": "SQL dumps can reconstruct database definitions and contents", "explanation": "PostgreSQL supports SQL scripts that reconstruct the saved database state. doc/src/sgml/ref/pg_dump.sgml:58 distinguishes scripts from archives.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_dump.sgml#L58-L61", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_dump.sgml:58-61"}]}, {"anchor": "F10", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F10", "claim": "\u2026-Fc: Sets the output as a custom-format archive suitable for input into pg_restore.", "explanation": "The c format selects archCustom in src/bin/pg_dump/pg_dump.c:1583. pg_restore accepts that format in src/bin/pg_dump/pg_restore.c:542.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_dump.sgml#L330-L331", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_dump.sgml:330-331"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dump.c#L1583-L1584", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dump.c:1583-1584"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_restore.c#L542-L542", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_restore.c:542-542"}]}, {"anchor": "F11", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F11", "claim": "-v: Specifies verbose mode\u2026", "title": "The -v option enables verbose mode", "explanation": "The -v branch sets g_verbose to true in src/bin/pg_dump/pg_dump.c:665.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dump.c#L665-L666", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dump.c:665-666"}]}, {"anchor": "F12", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F12", "claim": "-g: Dump only global objects (roles and tablespaces), no databases.", "title": "The -g option exports global objects without database dumps", "explanation": "pg_dumpall exports roles and tablespaces in src/bin/pg_dump/pg_dumpall.c:650. The globals_only condition skips dumpDatabases at line 674.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dumpall.c#L650-L665", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dumpall.c:650-665"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dumpall.c#L674-L675", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dumpall.c:674-675"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dumpall.c#L713-L713", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dumpall.c:713-713"}]}, {"anchor": "F13", "url": "https://pgtrue.postgres.ai/shared/brief/8fd47705-dc09-4269-bb46-a56f84119630#F13", "claim": "This time depends on the following parameters.", "title": "Data volume, parallel jobs, and hardware affect migration duration", "explanation": "PostgreSQL documents job-count and hardware effects in doc/src/sgml/ref/pg_restore.sgml:270. pg_dump copies table contents until COPY completes in src/bin/pg_dump/pg_dump.c:2390. These support the listed duration factors without establishing a numerical estimate.", "verdict": "Accurate", "sources": [{"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_restore.sgml#L270-L273", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_restore.sgml:270-273"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/doc/src/sgml/ref/pg_restore.sgml#L283-L285", "label": "REL_18_6 \u00b7 doc/src/sgml/ref/pg_restore.sgml:283-285"}, {"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/bin/pg_dump/pg_dump.c#L2390-L2401", "label": "REL_18_6 \u00b7 src/bin/pg_dump/pg_dump.c:2390-2401"}]}]}