{"kind": "tool", "major": "18", "item": {"slug": "pg-dumpall", "name": "pg_dumpall", "name_zh": "", "category": "\u5ba2\u6237\u7aef\u7a0b\u5e8f", "summary": "pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6", "aliases": ["pg_dumpall"], "content_hash": "dafa76d690043fe47f2108540967788a53be98fc635176dabd5ab2ea38db0f22", "versions": {"10": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "10.23"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "38"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5305\u542b\u7528\u4e8e\u5728\u91cd\u65b0\u521b\u5efa\u6570\u636e\u5e93\u4e4b\u524d\u6e05\u7406\uff08\u5220\u9664\uff09\u6570\u636e\u5e93\u7684 SQL \u547d\u4ee4\u3002\u4e5f\u4f1a\u6dfb\u52a0\u7528\u4e8e\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 DROP \u547d\u4ee4\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u5c06\u5bf9\u8c61\u6807\u8bc6\u7b26\uff08 OID \uff09\u4f5c\u4e3a\u6bcf\u4e2a\u8868\u7684\u6570\u636e\u7684\u4e00\u90e8\u5206\u8fdb\u884c\u8f6c\u50a8\u3002\u5982\u679c\u5e94\u7528\u7a0b\u5e8f\u4ee5\u67d0\u79cd\u65b9\u5f0f\u5f15\u7528 OID \u5217\uff08\u4f8b\u5982\u5728\u5916\u952e\u7ea6\u675f\u4e2d\uff09\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002\u5426\u5219\uff0c\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-o --oids"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528 pg_dump \u7684\u8be6\u7ec6\u8f93\u51fa\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4f7f\u7528\u6761\u4ef6\u547d\u4ee4\uff08\u5373\u6dfb\u52a0 IF EXISTS \u5b50\u53e5\uff09\u6765\u6e05\u7406\u6570\u636e\u5e93\u548c\u5176\u4ed6\u5bf9\u8c61\u3002\u53ea\u6709\u540c\u65f6\u6307\u5b9a --clean \uff0c\u6b64\u9009\u9879\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/10/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well.", "signature": "-c --clean", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well."}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-o", "--oids"], "summary": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.", "signature": "-o --oids", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "signature": "-v --verbose", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/10/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/10/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload.", "signature": "--disable-triggers", "source_url": "/docs/10/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--if-exists"], "summary": "Use conditional commands (i.e., add an IF EXISTS clause) to clean databases and other objects. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Use conditional commands (i.e., add an IF EXISTS clause) to clean databases and other objects. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/10/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, database name in the connection string will be ignored. Use -l option to specify the name of the database used to dump global objects and to discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/10/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/10/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=10", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "label": "10.23", "major": "10", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/10/postgresql-10-A4.pdf", "bytes": 12631706, "pages": 2591, "sha256": "34497ab9efb45c5bdf1bd11b9016b5451354feb462fa029cf74557a5fa5fbbc1", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/10/postgresql-10-US.pdf", "bytes": 12531684, "pages": 2724, "sha256": "429cc7133ddf4f97c560aa466dc9caea4b718721a8321e293357037cf0af4733", "built_at": "2026-09-26"}}, "tree": "10", "index": "index.html", "major": "10", "pages": 1085, "release": "10.23", "source_url": "https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.bz2", "svg_assets": 0, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "revision": "f9301feba91e2e2566038a36b8cee0e4402db68989538f88670fddd20b1f78ea", "evidence_kind": "English manual and source declarations", "source_sha256": "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9"}, "sources": [{"url": "https://pg.center/docs/10/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "10.23 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "f29753397eb215a0f74cf563584b2de22a589d6f5732b51ddc2e31e5e7070f0e", "language": "en", "original_url": "/docs/10/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/10/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "e4330732b6acd6c025a1fbdce45574b23d964de847a1b849ea88b98ab628d2e2", "language": "en", "original_url": "/docs/10/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.13.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/10/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/10/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09\u76ee\u524d\u5305\u62ec\u6570\u636e\u5e93\u7528\u6237\u548c\u7ec4\u3001\u8868\u7a7a\u95f4\uff0c\u4ee5\u53ca\u9002\u7528\u4e8e\u6574\u4e2a\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u6743\u9650\u7b49\u5c5e\u6027\u7684\u4fe1\u606f\u3002</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u7528\u6237\u548c\u7ec4\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/10/libpq-pgpass.html\" title=\"33.15.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a033.15\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5305\u542b\u7528\u4e8e\u5728\u91cd\u65b0\u521b\u5efa\u6570\u636e\u5e93\u4e4b\u524d\u6e05\u7406\uff08\u5220\u9664\uff09\u6570\u636e\u5e93\u7684 SQL \u547d\u4ee4\u3002\u4e5f\u4f1a\u6dfb\u52a0\u7528\u4e8e\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684<code class=\"command\">DROP</code>\u547d\u4ee4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o</code><br/></span><span class=\"term\"><code class=\"option\">--oids</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u5bf9\u8c61\u6807\u8bc6\u7b26\uff08OID\uff09\u4f5c\u4e3a\u6bcf\u4e2a\u8868\u7684\u6570\u636e\u7684\u4e00\u90e8\u5206\u8fdb\u884c\u8f6c\u50a8\u3002\u5982\u679c\u5e94\u7528\u4ee5\u67d0\u79cd\u65b9\u5f0f\u5f15\u7528\u4e86 OID \u5217\uff08\u4f8b\u5982\u5916\u952e\u7ea6\u675f\uff09\uff0c\u5e94\u4f7f\u7528\u6b64\u9009\u9879\uff1b\u5426\u5219\u4e0d\u5e94\u4f7f\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528<span class=\"application\">pg_dump</span>\u7684\u8be6\u7ec6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u8c28\u614e\u5730\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528\u6761\u4ef6\u547d\u4ee4\uff08\u5373\u6dfb\u52a0<code class=\"literal\">IF EXISTS</code>\u5b50\u53e5\uff09\u6765\u6e05\u7406\u6570\u636e\u5e93\u548c\u5176\u4ed6\u5bf9\u8c61\u3002\u53ea\u6709\u540c\u65f6\u6307\u5b9a<code class=\"option\">--clean</code>\uff0c\u6b64\u9009\u9879\u624d\u6709\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/10/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u548c\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u8fd9\u4e2a\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/10/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.8\">\n<h2 lang=\"zh\">\u6ce8\u610f</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u91cd\u65b0\u88c5\u8f7d\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -f db.out postgres</code></strong>\n</pre>\n<p lang=\"zh\">\uff08\u8fd9\u91cc\u8fde\u63a5\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a <span class=\"application\">pg_dumpall</span> \u521b\u5efa\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u9002\u5f53\u7684\u547d\u4ee4\uff0c\u7528\u4e8e\u521b\u5efa\u5e76\u8fde\u63a5\u5230\u5df2\u4fdd\u5b58\u7684\u6570\u636e\u5e93\u3002\uff09</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/10/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/10/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "ebe26c4c09afa84c169ef94d6eb6005c9159dd0faff1eb687a8b2ecd37347fd4", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/10/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/10/facts/0/label": "Documented executable", "/versions/10/facts/1/label": "Executable version", "/versions/10/facts/2/label": "Reference inventory", "/versions/10/facts/2/value": "Client applications", "/versions/10/facts/3/label": "Option definition groups", "/versions/10/tables/0/title": "Documented options", "/versions/10/tables/1/title": "Environment variables", "/versions/10/related/0/label": "libpq connection parameters", "/versions/10/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/10/tables/0/rows/1/summary": "Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well.", "/versions/10/tables/0/rows/2/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/10/tables/0/rows/3/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/10/tables/0/rows/4/summary": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.", "/versions/10/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/10/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/10/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/10/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/10/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/10/tables/0/columns/0/label": "Option and arguments", "/versions/10/tables/0/columns/1/label": "Description", "/versions/10/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "/versions/10/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/10/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/10/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/10/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/10/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/10/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload.", "/versions/10/tables/0/rows/17/summary": "Use conditional commands (i.e., add an IF EXISTS clause) to clean databases and other objects. This option is not valid unless --clean is also specified.", "/versions/10/tables/0/rows/18/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/10/tables/0/rows/19/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "/versions/10/tables/0/rows/20/summary": "Do not dump publications.", "/versions/10/tables/0/rows/21/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/10/tables/0/rows/22/summary": "Do not dump security labels.", "/versions/10/tables/0/rows/23/summary": "Do not dump subscriptions.", "/versions/10/tables/0/rows/24/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/10/tables/0/rows/25/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/10/tables/0/rows/26/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/10/tables/0/rows/27/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/10/tables/0/rows/28/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/10/tables/0/rows/29/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/10/tables/0/rows/30/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/10/tables/0/rows/31/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/10/tables/0/rows/32/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/10/tables/0/rows/33/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/10/tables/0/rows/34/summary": "User name to connect as.", "/versions/10/tables/0/rows/35/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/10/tables/0/rows/36/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/10/tables/0/rows/37/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/10/tables/1/columns/0/label": "Variable", "/versions/10/tables/1/columns/1/label": "Meaning", "/versions/10/tables/1/rows/0/description": "Default connection parameters"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "b192405c9a35448494de4885fc5bf0c8fc6531a508159aa648b8d8b436f650a9"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well."}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-o", "--oids"], "signature": "-o --oids", "description": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use conditional commands (i.e., add an IF EXISTS clause) to clean databases and other objects. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, database name in the connection string will be ignored. Use -l option to specify the name of the database used to dump global objects and to discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}]}, "comparison_hash": "1cc99dff7530ea8095b71e6ee9b84580563d3561d73a34486560880f13e37ac3", "manual_language": "zh"}, "11": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "11.22"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "41"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u5c06\u5bf9\u8c61\u6807\u8bc6\u7b26\uff08 OID \uff09\u4f5c\u4e3a\u6bcf\u4e2a\u8868\u7684\u6570\u636e\u7684\u4e00\u90e8\u5206\u8fdb\u884c\u8f6c\u50a8\u3002\u5982\u679c\u5e94\u7528\u7a0b\u5e8f\u4ee5\u67d0\u79cd\u65b9\u5f0f\u5f15\u7528 OID \u5217\uff08\u4f8b\u5982\u5728\u5916\u952e\u7ea6\u675f\u4e2d\uff09\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002\u5426\u5219\uff0c\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-o --oids"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528 pg_dump \u7684\u8be6\u7ec6\u8f93\u51fa\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/11/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-o", "--oids"], "summary": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.", "signature": "-o --oids", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "signature": "-v --verbose", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/11/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/11/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/11/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/11/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/11/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/11/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/11/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=11", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "label": "11.22", "major": "11", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/11/postgresql-11-A4.pdf", "bytes": 13057499, "pages": 2732, "sha256": "41d75855e610d0d9b8802b87dc5b080bef8d7e91c7cf69401fbf8d3cf801b4b5", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/11/postgresql-11-US.pdf", "bytes": 12961189, "pages": 2883, "sha256": "6a8899ef36935a5b7ed2b436207564a567a4ef1eb1c2200195876b8de4d4fa30", "built_at": "2026-09-26"}}, "tree": "11", "index": "index.html", "major": "11", "pages": 1125, "release": "11.22", "source_url": "https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.bz2", "svg_assets": 0, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "revision": "53315ddaf3b3f9e6669fd1edc096bbb2cd4a65ea3e836c89e542b43af9ba3a7f", "evidence_kind": "English manual and source declarations", "source_sha256": "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0"}, "sources": [{"url": "https://pg.center/docs/11/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "11.22 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "b76a8cba418f43c63c9f6d98f9808df26a07086249195a62921e14af7d52cdd8", "language": "en", "original_url": "/docs/11/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/11/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "3a30e696058b118a55cc42892c39671d9bae86f77e1024d5ebcc4688ad9ab4c3", "language": "en", "original_url": "/docs/11/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.13.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/11/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/11/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/11/libpq-pgpass.html\" title=\"34.15.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a034.15\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-o</code><br/></span><span class=\"term\"><code class=\"option\">--oids</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5c06\u5bf9\u8c61\u6807\u8bc6\u7b26\uff08OID\uff09\u4f5c\u4e3a\u6bcf\u4e2a\u8868\u7684\u6570\u636e\u7684\u4e00\u90e8\u5206\u8fdb\u884c\u8f6c\u50a8\u3002\u5982\u679c\u5e94\u7528\u4ee5\u67d0\u79cd\u65b9\u5f0f\u5f15\u7528\u4e86 OID \u5217\uff08\u4f8b\u5982\u5916\u952e\u7ea6\u675f\uff09\uff0c\u5e94\u4f7f\u7528\u6b64\u9009\u9879\uff1b\u5426\u5219\u4e0d\u5e94\u4f7f\u7528\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528<span class=\"application\">pg_dump</span>\u7684\u8be6\u7ec6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u8c28\u614e\u5730\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/11/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/11/libpq-envars.html\" title=\"34.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -f db.out postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a <span class=\"application\">pg_dumpall</span> \u521b\u5efa\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u9002\u5f53\u7684\u547d\u4ee4\uff0c\u7528\u4e8e\u521b\u5efa\u5e76\u8fde\u63a5\u5230\u5df2\u4fdd\u5b58\u7684\u6570\u636e\u5e93\u3002\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5c31\u5fc5\u987b\u9996\u5148\u8fde\u63a5\u5230 <code class=\"literal\">postgres</code> \u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u4e8e\u5f53\u524d\u8fde\u63a5\u7684\u6570\u636e\u5e93\uff0c\u8fd9\u79cd\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/11/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/11/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "4ec176230b6b2bdbe857436dfdb9cdba5d9caeec8e62151c22879a63506d9d26", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/11/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/11/facts/0/label": "Documented executable", "/versions/11/facts/1/label": "Executable version", "/versions/11/facts/2/label": "Reference inventory", "/versions/11/facts/2/value": "Client applications", "/versions/11/facts/3/label": "Option definition groups", "/versions/11/tables/0/title": "Documented options", "/versions/11/tables/1/title": "Environment variables", "/versions/11/related/0/label": "libpq connection parameters", "/versions/11/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/11/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/11/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/11/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/11/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/11/tables/0/rows/5/summary": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used.", "/versions/11/tables/0/rows/6/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/11/tables/0/rows/7/summary": "Dump only roles, no databases or tablespaces.", "/versions/11/tables/0/rows/8/summary": "Dump only the object definitions (schema), not data.", "/versions/11/tables/0/rows/9/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/11/tables/0/columns/0/label": "Option and arguments", "/versions/11/tables/0/columns/1/label": "Description", "/versions/11/tables/0/rows/10/summary": "Dump only tablespaces, no databases or roles.", "/versions/11/tables/0/rows/11/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "/versions/11/tables/0/rows/12/summary": "Print the pg_dumpall version and exit.", "/versions/11/tables/0/rows/13/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/11/tables/0/rows/14/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/11/tables/0/rows/15/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/11/tables/0/rows/16/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/11/tables/0/rows/17/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/11/tables/0/rows/18/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/11/tables/0/rows/19/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/11/tables/0/rows/20/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/11/tables/0/rows/21/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "/versions/11/tables/0/rows/22/summary": "Do not dump comments.", "/versions/11/tables/0/rows/23/summary": "Do not dump publications.", "/versions/11/tables/0/rows/24/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/11/tables/0/rows/25/summary": "Do not dump security labels.", "/versions/11/tables/0/rows/26/summary": "Do not dump subscriptions.", "/versions/11/tables/0/rows/27/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/11/tables/0/rows/28/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/11/tables/0/rows/29/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/11/tables/0/rows/30/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/11/tables/0/rows/31/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/11/tables/0/rows/32/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/11/tables/0/rows/33/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/11/tables/0/rows/34/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/11/tables/0/rows/35/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/11/tables/0/rows/36/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/11/tables/0/rows/37/summary": "User name to connect as.", "/versions/11/tables/0/rows/38/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/11/tables/0/rows/39/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/11/tables/0/rows/40/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/11/tables/1/columns/0/label": "Variable", "/versions/11/tables/1/columns/1/label": "Meaning", "/versions/11/tables/1/rows/0/description": "Default connection parameters"}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "7f68da31aff9d209ff10f53b6d8252cdbdff1e792629d48efc714dcb79b60136"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-o", "--oids"], "signature": "-o --oids", "description": "Dump object identifiers ( OID s) as part of the data for every table. Use this option if your application references the OID columns in some way (e.g., in a foreign key constraint). Otherwise, this option should not be used."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}]}, "comparison_hash": "4b7b5673f507a56d4ccdf588c3a44a0cc3783ab56162175ec17cd9c653391401", "manual_language": "zh"}, "12": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "12.22"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "44"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528 pg_dump \u7684\u8be6\u7ec6\u8f93\u51fa\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u5c0f\u5fc3\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/12/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "signature": "-v --verbose", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/12/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/12/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/12/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/12/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/12/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/12/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/12/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=12", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "label": "12.22", "major": "12", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/12/postgresql-12-A4.pdf", "bytes": 13424351, "pages": 2803, "sha256": "7422cf53fd1939e7a3d2925231a88b0330e468afa5393627cac0ff86158a0621", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/12/postgresql-12-US.pdf", "bytes": 13322565, "pages": 2958, "sha256": "51f3b04e72907fc38512685946223452ea65f84419c60c66241dfa3396035e77", "built_at": "2026-09-26"}}, "tree": "12", "index": "index.html", "major": "12", "pages": 1131, "release": "12.22", "source_url": "https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.bz2", "svg_assets": 2, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "revision": "7a827e97cbfacd7febff75f34443e2043e40723de5b6d8c9d81a9430b65a37e4", "evidence_kind": "English manual and source declarations", "source_sha256": "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b"}, "sources": [{"url": "https://pg.center/docs/12/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "12.22 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "c15edf1a2bffa2fd758886d3ea45a69094c71a140d9417dfc162eb62e6612fef", "language": "en", "original_url": "/docs/12/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/12/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "089624dd131f52eea682b304f87a1acb03392ee7bcf78b000699c9b17c7ca22d", "language": "en", "original_url": "/docs/12/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.13.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/12/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/12/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/12/libpq-pgpass.html\" title=\"33.15.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a033.15\u00a0\u8282</a>\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528<span class=\"application\">pg_dump</span>\u7684\u8be6\u7ec6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u8c28\u614e\u5730\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/12/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u5c0f\u5fc3\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/12/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/12/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -f db.out postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a <span class=\"application\">pg_dumpall</span> \u521b\u5efa\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u9002\u5f53\u7684\u547d\u4ee4\uff0c\u7528\u4e8e\u521b\u5efa\u5e76\u8fde\u63a5\u5230\u5df2\u4fdd\u5b58\u7684\u6570\u636e\u5e93\u3002\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5c31\u5fc5\u987b\u9996\u5148\u8fde\u63a5\u5230 <code class=\"literal\">postgres</code> \u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u4e8e\u5f53\u524d\u8fde\u63a5\u7684\u6570\u636e\u5e93\uff0c\u8fd9\u79cd\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/12/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/12/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "284293db7914e3186d480f3126343bd95e9980bffea459c042c2c8e28f7eca08", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/12/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/12/facts/0/label": "Documented executable", "/versions/12/facts/1/label": "Executable version", "/versions/12/facts/2/label": "Reference inventory", "/versions/12/facts/2/value": "Client applications", "/versions/12/facts/3/label": "Option definition groups", "/versions/12/tables/0/title": "Documented options", "/versions/12/tables/1/title": "Environment variables", "/versions/12/related/0/label": "libpq connection parameters", "/versions/12/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/12/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/12/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/12/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/12/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/12/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/12/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/12/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/12/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/12/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/12/tables/0/columns/0/label": "Option and arguments", "/versions/12/tables/0/columns/1/label": "Description", "/versions/12/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "/versions/12/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/12/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/12/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/12/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/12/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/12/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/12/tables/0/rows/17/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/12/tables/0/rows/18/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/12/tables/0/rows/19/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/12/tables/0/rows/20/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/12/tables/0/rows/21/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/12/tables/0/rows/22/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "/versions/12/tables/0/rows/23/summary": "Do not dump comments.", "/versions/12/tables/0/rows/24/summary": "Do not dump publications.", "/versions/12/tables/0/rows/25/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/12/tables/0/rows/26/summary": "Do not dump security labels.", "/versions/12/tables/0/rows/27/summary": "Do not dump subscriptions.", "/versions/12/tables/0/rows/28/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/12/tables/0/rows/29/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/12/tables/0/rows/30/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/12/tables/0/rows/31/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/12/tables/0/rows/32/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/12/tables/0/rows/33/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/12/tables/0/rows/34/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/12/tables/0/rows/35/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/12/tables/0/rows/36/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/12/tables/0/rows/37/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/12/tables/0/rows/38/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/12/tables/0/rows/39/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/12/tables/0/rows/40/summary": "User name to connect as.", "/versions/12/tables/0/rows/41/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/12/tables/0/rows/42/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/12/tables/0/rows/43/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/12/tables/1/columns/0/label": "Variable", "/versions/12/tables/1/columns/1/label": "Meaning", "/versions/12/tables/1/rows/0/description": "Default connection parameters", "/versions/12/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "62dfbb5e9ce9d1d26c6d50fd2c4d5e6a13d84b89a17eddf4de9ab60ceeb86a17"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "24628b04cbc488c6cb2f05d0eb3eb81e90075e26f6d3af7181eedad7a1ea6c54", "manual_language": "zh"}, "13": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "13.23"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "45"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528 pg_dump \u7684\u8be6\u7ec6\u8f93\u51fa\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u5c0f\u5fc3\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/13/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "signature": "-v --verbose", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/13/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/13/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/13/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/13/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/13/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/13/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/13/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=13", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "label": "13.23", "major": "13", "channel": "historical", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/13/postgresql-13-A4.pdf", "bytes": 13843239, "pages": 2826, "sha256": "171cc09f90936dbc1cbd503a98ff07ae72ea58ab9771ff051313f1217737799c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/13/postgresql-13-US.pdf", "bytes": 13739572, "pages": 2984, "sha256": "48d09c6e197d9db4220f41afe83efe848a8661b1b168d3b89419751ecaf6c24d", "built_at": "2026-09-26"}}, "tree": "13", "index": "index.html", "major": "13", "pages": 1139, "release": "13.23", "source_url": "https://ftp.postgresql.org/pub/source/v13.23/postgresql-13.23.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "revision": "614ee3133270254e476c118cdf6f72af78d4e4b8bbd9b28ed9ab1e14e4e9c0f6", "evidence_kind": "English manual and source declarations", "source_sha256": "6ec3c82726af92b7dec873fa1cdf881eca92a4219787dfad05acb6b10e041fd6"}, "sources": [{"url": "https://pg.center/docs/13/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "13.23 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "b97011686172608f1369d74c6092377b32ba04b183d0be106e0bf79d76791a0e", "language": "en", "original_url": "/docs/13/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/13/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "2a16c2982d9803edd4bd6920f76b66083e7f2959182d6a3bcec7ccfbac0a9ad8", "language": "en", "original_url": "/docs/13/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.13.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/13/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/13/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/13/libpq-pgpass.html\" title=\"33.15.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a033.15\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u5b83\u8fd8\u4f1a\u542f\u7528<span class=\"application\">pg_dump</span>\u7684\u8be6\u7ec6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u8c28\u614e\u5730\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684<a class=\"xref\" href=\"/docs/13/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u5c0f\u5fc3\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u4f1a\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u8868\u4e0a\u7684\u5171\u4eab\u9501\u3002\u5982\u679c\u5728\u6307\u5b9a\u7684 timeout \u5185\u65e0\u6cd5\u9501\u5b9a\u8868\uff0c\u5219\u5931\u8d25\u3002timeout \u53ef\u4ee5\u91c7\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u3002\u5141\u8bb8\u7684\u503c\u53d6\u51b3\u4e8e\u88ab\u8f6c\u50a8\u670d\u52a1\u5668\u7684\u7248\u672c\uff0c\u4f46\u81ea 7.3 \u8d77\uff0c\u6240\u6709\u7248\u672c\u90fd\u63a5\u53d7\u4ee5\u6574\u6570\u6beb\u79d2\u8868\u793a\u7684\u503c\u3002\u8f6c\u50a8 7.3 \u4e4b\u524d\u7684\u670d\u52a1\u5668\u65f6\uff0c\u6b64\u9009\u9879\u4f1a\u88ab\u5ffd\u7565\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/13/libpq.html#LIBPQ-CONNSTRING\" title=\"33.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/13/libpq-envars.html\" title=\"33.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a033.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.13.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/13/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\">pg_dump</span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/13/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "6dc4f239d7c6eb9cae9b8105e0139f45ea0c1e50f1af793a0cc548869975d73b", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/13/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/13/facts/0/label": "Documented executable", "/versions/13/facts/1/label": "Executable version", "/versions/13/facts/2/label": "Reference inventory", "/versions/13/facts/2/value": "Client applications", "/versions/13/facts/3/label": "Option definition groups", "/versions/13/tables/0/title": "Documented options", "/versions/13/tables/1/title": "Environment variables", "/versions/13/related/0/label": "libpq connection parameters", "/versions/13/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/13/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/13/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/13/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/13/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/13/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/13/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/13/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/13/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/13/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/13/tables/0/columns/0/label": "Option and arguments", "/versions/13/tables/0/columns/1/label": "Description", "/versions/13/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump .", "/versions/13/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/13/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/13/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/13/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/13/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/13/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/13/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/13/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/13/tables/0/rows/19/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/13/tables/0/rows/20/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/13/tables/0/rows/21/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/13/tables/0/rows/22/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.", "/versions/13/tables/0/rows/23/summary": "Do not dump comments.", "/versions/13/tables/0/rows/24/summary": "Do not dump publications.", "/versions/13/tables/0/rows/25/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/13/tables/0/rows/26/summary": "Do not dump security labels.", "/versions/13/tables/0/rows/27/summary": "Do not dump subscriptions.", "/versions/13/tables/0/rows/28/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/13/tables/0/rows/29/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/13/tables/0/rows/30/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/13/tables/0/rows/31/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/13/tables/0/rows/32/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/13/tables/0/rows/33/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/13/tables/0/rows/34/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/13/tables/0/rows/35/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/13/tables/0/rows/36/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/13/tables/0/rows/37/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/13/tables/0/rows/38/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/13/tables/0/rows/39/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/13/tables/0/rows/40/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/13/tables/0/rows/41/summary": "User name to connect as.", "/versions/13/tables/0/rows/42/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/13/tables/0/rows/43/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/13/tables/0/rows/44/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/13/tables/1/columns/0/label": "Variable", "/versions/13/tables/1/columns/1/label": "Meaning", "/versions/13/tables/1/rows/0/description": "Default connection parameters", "/versions/13/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "74e9b2eff7166ea644674f00b3cae9e376f3a3eb3618c219f209888bbc3e7822"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. It will also enable verbose output in pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "8f35b7976f748fe3fd8ba5f94dfa540bdf55c07ee7919b50a9d0fc0ac8c274b4", "manual_language": "zh"}, "14": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "14.24"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "46"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/14/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/14/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/14/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/14/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/14/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/14/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/14/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/14/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=14", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "label": "14.24", "major": "14", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/14/postgresql-14-A4.pdf", "bytes": 14354704, "pages": 2944, "sha256": "8bc6b9dd7b246888bb77f0a5e8c39a2eae52e9926569832669c7d1600becb27c", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/14/postgresql-14-US.pdf", "bytes": 14242178, "pages": 3102, "sha256": "b7ecb5a5f62d8b9f73a69e25a7d26ba285373bc53168a553bff7b77955506db4", "built_at": "2026-09-26"}}, "tree": "14", "index": "index.html", "major": "14", "pages": 1158, "release": "14.24", "source_url": "https://ftp.postgresql.org/pub/source/v14.24/postgresql-14.24.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "revision": "588700d46356d8837c77c7c0a4e71e645fe6535983b8f1830aa8f2e4e41c40ae", "evidence_kind": "English manual and source declarations", "source_sha256": "a7fa7ed3d558172355f51406097a7bd4f6b473be80f311ef7cda96bf383d8897"}, "sources": [{"url": "https://pg.center/docs/14/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "14.24 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "46fcafed3b93bc5688e40d89276624b5c25968800a78e8a6f371f4ea1d882a30", "language": "en", "original_url": "/docs/14/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/14/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "5a13567a052954dfe494dfaab9f50919faa1ae56023930fdbb78d45e53feccde", "language": "en", "original_url": "/docs/14/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.14.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/14/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/14/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/14/libpq-pgpass.html\" title=\"34.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a034.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684<a class=\"xref\" href=\"/docs/14/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/14/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/14/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/14/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/14/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "4c7f494ffe925c28f83b6dd346bb47bd155ac939003408412de4293548ae5be6", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/14/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/14/facts/0/label": "Documented executable", "/versions/14/facts/1/label": "Executable version", "/versions/14/facts/2/label": "Reference inventory", "/versions/14/facts/2/value": "Client applications", "/versions/14/facts/3/label": "Option definition groups", "/versions/14/tables/0/title": "Documented options", "/versions/14/tables/1/title": "Environment variables", "/versions/14/related/0/label": "libpq connection parameters", "/versions/14/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/14/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/14/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/14/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/14/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/14/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/14/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/14/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/14/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/14/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/14/tables/0/columns/0/label": "Option and arguments", "/versions/14/tables/0/columns/1/label": "Description", "/versions/14/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/14/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/14/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/14/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/14/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/14/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/14/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/14/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/14/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/14/tables/0/rows/19/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/14/tables/0/rows/20/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/14/tables/0/rows/21/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/14/tables/0/rows/22/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/14/tables/0/rows/23/summary": "Do not dump comments.", "/versions/14/tables/0/rows/24/summary": "Do not dump publications.", "/versions/14/tables/0/rows/25/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/14/tables/0/rows/26/summary": "Do not dump security labels.", "/versions/14/tables/0/rows/27/summary": "Do not dump subscriptions.", "/versions/14/tables/0/rows/28/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/14/tables/0/rows/29/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/14/tables/0/rows/30/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/14/tables/0/rows/31/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/14/tables/0/rows/32/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/14/tables/0/rows/33/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/14/tables/0/rows/34/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/14/tables/0/rows/35/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/14/tables/0/rows/36/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/14/tables/0/rows/37/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/14/tables/0/rows/38/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/14/tables/0/rows/39/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/14/tables/0/rows/40/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/14/tables/0/rows/41/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/14/tables/0/rows/42/summary": "User name to connect as.", "/versions/14/tables/0/rows/43/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/14/tables/0/rows/44/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/14/tables/0/rows/45/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/14/tables/1/columns/0/label": "Variable", "/versions/14/tables/1/columns/1/label": "Meaning", "/versions/14/tables/1/rows/0/description": "Default connection parameters", "/versions/14/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "e807b0783e0eb51525fa3b195d33483741d5fd92dffbcca40dfc25a6bcf750b8"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "97da95cfcd71e7faf092eef446199e6ee235fded354e0bae88f3a15f711d71c6", "manual_language": "zh"}, "15": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "15.19"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "47"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/15/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/15/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/15/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/15/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/15/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/15/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/15/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/15/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=15", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "label": "15.19", "major": "15", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/15/postgresql-15-A4.pdf", "bytes": 14609140, "pages": 2987, "sha256": "66228564a4d16efb47d6a914085716ecfe22ca1566db56bc7c3d82f790646d72", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/15/postgresql-15-US.pdf", "bytes": 14495690, "pages": 3153, "sha256": "645a498c2390d47a6223ec74770631185807a19c484edb0fc5a295d9f460bc02", "built_at": "2026-09-26"}}, "tree": "15", "index": "index.html", "major": "15", "pages": 1168, "release": "15.19", "source_url": "https://ftp.postgresql.org/pub/source/v15.19/postgresql-15.19.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "revision": "6af958c6520151fc7697d56e0616b03fb00522c4568158674d452ae0644ba545", "evidence_kind": "English manual and source declarations", "source_sha256": "e1a64a87a46b825b88c082e4518161a47aab53c45694964f8ba1df28f7859f89"}, "sources": [{"url": "https://pg.center/docs/15/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "15.19 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "60cbac2bd4a1dedac467898a5ec8828e42c66de8a9087761230f041090d69713", "language": "en", "original_url": "/docs/15/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/15/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "015b2ea2bd205946a55a1b837e735570631bac831c92074a6bf58444f9a3cb98", "language": "en", "original_url": "/docs/15/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.14.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/15/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/15/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/15/libpq-pgpass.html\" title=\"34.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a034.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1\u4e0b\u6587\u7684<a class=\"xref\" href=\"/docs/15/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/15/libpq.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/15/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/15/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/15/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "35e744c947cad0176820189bd31a224cd899af2f54bfe970be989315c4bae6c3", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[77]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/15/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/15/facts/0/label": "Documented executable", "/versions/15/facts/1/label": "Executable version", "/versions/15/facts/2/label": "Reference inventory", "/versions/15/facts/2/value": "Client applications", "/versions/15/facts/3/label": "Option definition groups", "/versions/15/tables/0/title": "Documented options", "/versions/15/tables/1/title": "Environment variables", "/versions/15/related/0/label": "libpq connection parameters", "/versions/15/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/15/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/15/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/15/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/15/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/15/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/15/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/15/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/15/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/15/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/15/tables/0/columns/0/label": "Option and arguments", "/versions/15/tables/0/columns/1/label": "Description", "/versions/15/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/15/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/15/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/15/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/15/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/15/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/15/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/15/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/15/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/15/tables/0/rows/19/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/15/tables/0/rows/20/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/15/tables/0/rows/21/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/15/tables/0/rows/22/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/15/tables/0/rows/23/summary": "Do not dump comments.", "/versions/15/tables/0/rows/24/summary": "Do not dump publications.", "/versions/15/tables/0/rows/25/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/15/tables/0/rows/26/summary": "Do not dump security labels.", "/versions/15/tables/0/rows/27/summary": "Do not dump subscriptions.", "/versions/15/tables/0/rows/28/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/15/tables/0/rows/29/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/15/tables/0/rows/30/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/15/tables/0/rows/31/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/15/tables/0/rows/32/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/15/tables/0/rows/33/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/15/tables/0/rows/34/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/15/tables/0/rows/35/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/15/tables/0/rows/36/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/15/tables/0/rows/37/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/15/tables/0/rows/38/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/15/tables/0/rows/39/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/15/tables/0/rows/40/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/15/tables/0/rows/41/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/15/tables/0/rows/42/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/15/tables/0/rows/43/summary": "User name to connect as.", "/versions/15/tables/0/rows/44/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/15/tables/0/rows/45/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/15/tables/0/rows/46/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/15/tables/1/columns/0/label": "Variable", "/versions/15/tables/1/columns/1/label": "Meaning", "/versions/15/tables/1/rows/0/description": "Default connection parameters", "/versions/15/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "4d426c78f61398768724bd662c49c63cb4f6030a0cec1f1e974089a4be176c34"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns below), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "42d1bd35e7f72b0aaec50129e9e2047d1ab2c695a0bb45eb7cd6d12c7a894cfc", "manual_language": "zh"}, "16": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "16.15"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "47"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/16/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/16/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/16/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/16/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/16/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/16/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/16/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/16/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=16", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "label": "16.15", "major": "16", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/16/postgresql-16-A4.pdf", "bytes": 15282337, "pages": 3055, "sha256": "4bb6c1f63deedac98736d8c4c7bc0fad0ac24e85b07e21ee10411872f06afd06", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/16/postgresql-16-US.pdf", "bytes": 15164148, "pages": 3220, "sha256": "5b6b6166c89991199e144bb0ae34c17a5f29826251dbf19db1abc0df3a3e771b", "built_at": "2026-09-26"}}, "tree": "16", "index": "index.html", "major": "16", "pages": 1169, "release": "16.15", "source_url": "https://ftp.postgresql.org/pub/source/v16.15/postgresql-16.15.tar.bz2", "svg_assets": 3, "source_mode": "en HTML verified against the pinned official archive", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "revision": "3c21e58b35318021716440e67bb8bafd392b6a2b965a244d90e9e33c99e0bdef", "evidence_kind": "English manual and source declarations", "source_sha256": "c1575341fa7bd40f5274ea465b34390f4dc64cdd0770af327005caaeb9f6b7ed"}, "sources": [{"url": "https://pg.center/docs/16/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "16.15 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "25ba3efb15acbcb9d4eec4b4c2b14993eb0252118fcb9b8c6ddf78c3bfe41b63", "language": "en", "original_url": "/docs/16/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/16/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "a28c30c3c0f8783e16d56413a0b6fd39487e336da1683b29b60abf1c229cef26", "language": "en", "original_url": "/docs/16/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.14.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/16/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/16/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/16/libpq-pgpass.html\" title=\"34.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a034.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/16/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/16/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"34.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/16/libpq-envars.html\" title=\"34.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a034.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.14.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/16/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/16/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "dc74e9f7e85180286905939de0dc7c143530b3970be6b4a27df3ce07acf34ce0", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[77]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/16/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/16/facts/0/label": "Documented executable", "/versions/16/facts/1/label": "Executable version", "/versions/16/facts/2/label": "Reference inventory", "/versions/16/facts/2/value": "Client applications", "/versions/16/facts/3/label": "Option definition groups", "/versions/16/tables/0/title": "Documented options", "/versions/16/tables/1/title": "Environment variables", "/versions/16/related/0/label": "libpq connection parameters", "/versions/16/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/16/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/16/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/16/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/16/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/16/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/16/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/16/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/16/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/16/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/16/tables/0/columns/0/label": "Option and arguments", "/versions/16/tables/0/columns/1/label": "Description", "/versions/16/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/16/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/16/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/16/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/16/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/16/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/16/tables/0/rows/16/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/16/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/16/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/16/tables/0/rows/19/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/16/tables/0/rows/20/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/16/tables/0/rows/21/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/16/tables/0/rows/22/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/16/tables/0/rows/23/summary": "Do not dump comments.", "/versions/16/tables/0/rows/24/summary": "Do not dump publications.", "/versions/16/tables/0/rows/25/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/16/tables/0/rows/26/summary": "Do not dump security labels.", "/versions/16/tables/0/rows/27/summary": "Do not dump subscriptions.", "/versions/16/tables/0/rows/28/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/16/tables/0/rows/29/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/16/tables/0/rows/30/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/16/tables/0/rows/31/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/16/tables/0/rows/32/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/16/tables/0/rows/33/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/16/tables/0/rows/34/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/16/tables/0/rows/35/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/16/tables/0/rows/36/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/16/tables/0/rows/37/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/16/tables/0/rows/38/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/16/tables/0/rows/39/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/16/tables/0/rows/40/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/16/tables/0/rows/41/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/16/tables/0/rows/42/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/16/tables/0/rows/43/summary": "User name to connect as.", "/versions/16/tables/0/rows/44/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/16/tables/0/rows/45/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/16/tables/0/rows/46/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/16/tables/1/columns/0/label": "Variable", "/versions/16/tables/1/columns/1/label": "Meaning", "/versions/16/tables/1/rows/0/description": "Default connection parameters", "/versions/16/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "a33c91ba20c66acff2215de35978edcd6f88d6c9785d3d27081677a85352e5b6"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "bbf091482ea32f43d40a8ef9dfa9872b232f589fe2f88417dd522db4c2273394", "manual_language": "zh"}, "17": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "17.11"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "48"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e --exclude-database \u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece STDIN \u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528 - \u4f5c\u4e3a\u6587\u4ef6\u540d\u3002 --filter \u53ef\u4e0e --exclude-database \u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--filter= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/17/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions).", "signature": "-a --data-only", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["--filter= filename"], "summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "signature": "--filter= filename", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/17/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/17/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/17/app-pg-dumpall.html", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/17/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump comments.", "signature": "--no-comments", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump comments."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/17/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/17/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/17/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=17", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "label": "17.11", "major": "17", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/17/postgresql-17-A4.pdf", "bytes": 15521293, "pages": 3099, "sha256": "1991354df0dc89e70ec39328c28988ef8b19c6a93671dab3893650b63e9f4e36", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/17/postgresql-17-US.pdf", "bytes": 15398150, "pages": 3270, "sha256": "07696c8f38abf31babf22d2db337093936e7c472d2af36d050b000c49bbcf52c", "built_at": "2026-09-26"}}, "tree": "17", "index": "index.html", "major": "17", "pages": 1143, "release": "17.11", "source_url": "https://ftp.postgresql.org/pub/source/v17.11/postgresql-17.11.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "revision": "58419c9b0dd42cb34c8d53695bb025a7e582edf55ccd4c5bcb1c2c7c71a37487", "evidence_kind": "English manual and source declarations", "source_sha256": "dd27f2b3c59e73ed14aa3324901242bf69a032a6347805f274e6260322d42979"}, "sources": [{"url": "https://pg.center/docs/17/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "17.11 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "132208181c2b65230d604e9aef9d6e740b89d693a7438e7253af6634a39372dc", "language": "en", "original_url": "/docs/17/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/17/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "3194fc72ddad8e2fcba55f8e007f83413cb352146cb65aaa9457a18d0314ee1b", "language": "en", "original_url": "/docs/17/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.15.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/17/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/17/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/17/libpq-pgpass.html\" title=\"32.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a032.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--filter=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e<code class=\"option\">--exclude-database</code>\u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece<code class=\"literal\">STDIN</code>\u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528<code class=\"filename\">-</code>\u4f5c\u4e3a\u6587\u4ef6\u540d\u3002<code class=\"option\">--filter</code>\u53ef\u4e0e<code class=\"option\">--exclude-database</code>\u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002</p>\n<p lang=\"zh\">\u8be5\u6587\u4ef6\u6bcf\u884c\u5217\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u5339\u914d\u6a21\u5f0f\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a</p>\n<pre class=\"synopsis\">exclude database <em class=\"replaceable\"><code>PATTERN</code></em>\n</pre>\n<p lang=\"zh\">\u4ee5 <code class=\"literal\">#</code> \u5f00\u5934\u7684\u884c\u88ab\u89c6\u4e3a\u6ce8\u91ca\u5e76\u5ffd\u7565\u3002\u6ce8\u91ca\u4e5f\u53ef\u4ee5\u653e\u5728\u5bf9\u8c61\u5339\u914d\u6a21\u5f0f\u884c\u4e4b\u540e\u3002\u7a7a\u767d\u884c\u540c\u6837\u4f1a\u88ab\u5ffd\u7565\u3002\u6709\u5173\u5982\u4f55\u5728\u5339\u914d\u6a21\u5f0f\u4e2d\u52a0\u5f15\u53f7\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u4ec5\u6570\u636e\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/17/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u6ce8\u91ca\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/17/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/17/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u6062\u590d\u5b8c\u6210\u540e\uff0c\u6700\u597d\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u8fd0\u884c<code class=\"command\">ANALYZE</code>\uff0c\u4ee5\u4fbf\u4f18\u5316\u5668\u83b7\u5f97\u6709\u7528\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/17/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/17/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "76cd15414f4b59a238b9e238d0edcdd652da8c374b41f3bba54199cf8ed30899", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[77]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[79]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]/p[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/17/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/17/facts/0/label": "Documented executable", "/versions/17/facts/1/label": "Executable version", "/versions/17/facts/2/label": "Reference inventory", "/versions/17/facts/2/value": "Client applications", "/versions/17/facts/3/label": "Option definition groups", "/versions/17/tables/0/title": "Documented options", "/versions/17/tables/1/title": "Environment variables", "/versions/17/related/0/label": "libpq connection parameters", "/versions/17/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions).", "/versions/17/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/17/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/17/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/17/tables/0/rows/4/summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "/versions/17/tables/0/rows/5/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/17/tables/0/rows/6/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/17/tables/0/rows/7/summary": "Dump only roles, no databases or tablespaces.", "/versions/17/tables/0/rows/8/summary": "Dump only the object definitions (schema), not data.", "/versions/17/tables/0/rows/9/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/17/tables/0/columns/0/label": "Option and arguments", "/versions/17/tables/0/columns/1/label": "Description", "/versions/17/tables/0/rows/10/summary": "Dump only tablespaces, no databases or roles.", "/versions/17/tables/0/rows/11/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/17/tables/0/rows/12/summary": "Print the pg_dumpall version and exit.", "/versions/17/tables/0/rows/13/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/17/tables/0/rows/14/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/17/tables/0/rows/15/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/17/tables/0/rows/16/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/17/tables/0/rows/17/summary": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/17/tables/0/rows/18/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/17/tables/0/rows/19/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/17/tables/0/rows/20/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/17/tables/0/rows/21/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/17/tables/0/rows/22/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/17/tables/0/rows/23/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/17/tables/0/rows/24/summary": "Do not dump comments.", "/versions/17/tables/0/rows/25/summary": "Do not dump publications.", "/versions/17/tables/0/rows/26/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/17/tables/0/rows/27/summary": "Do not dump security labels.", "/versions/17/tables/0/rows/28/summary": "Do not dump subscriptions.", "/versions/17/tables/0/rows/29/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/17/tables/0/rows/30/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/17/tables/0/rows/31/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/17/tables/0/rows/32/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/17/tables/0/rows/33/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/17/tables/0/rows/34/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/17/tables/0/rows/35/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/17/tables/0/rows/36/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/17/tables/0/rows/37/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/17/tables/0/rows/38/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/17/tables/0/rows/39/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/17/tables/0/rows/40/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/17/tables/0/rows/41/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/17/tables/0/rows/42/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/17/tables/0/rows/43/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/17/tables/0/rows/44/summary": "User name to connect as.", "/versions/17/tables/0/rows/45/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/17/tables/0/rows/46/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/17/tables/0/rows/47/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/17/tables/1/columns/0/label": "Variable", "/versions/17/tables/1/columns/1/label": "Meaning", "/versions/17/tables/1/rows/0/description": "Default connection parameters", "/versions/17/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "068e3ce817a8c35059fd84052b2d763690bbec50a8dca25fe9dd9bf5f6a0fc3f"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions)."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["--filter= filename"], "signature": "--filter= filename", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump comments."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "63c7fcb8cf8d3e6a1293d93963fad4075ec2f12c569252cde447513380998e45", "manual_language": "zh"}, "18": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "55"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e --exclude-database \u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece STDIN \u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528 - \u4f5c\u4e3a\u6587\u4ef6\u540d\u3002 --filter \u53ef\u4e0e --exclude-database \u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--filter= filename"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8 COMMENT \u547d\u4ee4\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-data"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-policies"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-schema"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-statistics"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--statistics"}}, {"summary": "\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--statistics-only"}}, {"summary": "\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 --no-data \u3001 --schema-only \u6216 --statistics-only \uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--sequence-data"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions) or statistics.", "signature": "-a --data-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "signature": "--filter= filename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/18/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump COMMENT commands.", "signature": "--no-comments", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "summary": "Do not dump data.", "signature": "--no-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump data."}, {"names": ["--no-policies"], "summary": "Do not dump row security policies.", "signature": "--no-policies", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "summary": "Do not dump schema (data definitions).", "signature": "--no-schema", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "summary": "Do not dump statistics. This is the default.", "signature": "--no-statistics", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/18/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "summary": "Dump optimizer statistics.", "signature": "--statistics", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "signature": "--statistics-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "signature": "--sequence-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/18/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=18", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "18.6 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "5f64e2921cefa4823764e46860b95e0f5f7568192670220a0bac10314c740683", "language": "en", "original_url": "/docs/18/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0", "language": "en", "original_url": "/docs/18/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.15.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/18/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/libpq-pgpass.html\" title=\"32.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a032.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--filter=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e<code class=\"option\">--exclude-database</code>\u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece<code class=\"literal\">STDIN</code>\u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528<code class=\"filename\">-</code>\u4f5c\u4e3a\u6587\u4ef6\u540d\u3002<code class=\"option\">--filter</code>\u53ef\u4e0e<code class=\"option\">--exclude-database</code>\u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002</p>\n<p lang=\"zh\">\u8be5\u6587\u4ef6\u6bcf\u884c\u5217\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u5339\u914d\u6a21\u5f0f\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a</p>\n<pre class=\"synopsis\">exclude database <em class=\"replaceable\"><code>PATTERN</code></em>\n</pre>\n<p lang=\"zh\">\u4ee5 <code class=\"literal\">#</code> \u5f00\u5934\u7684\u884c\u88ab\u89c6\u4e3a\u6ce8\u91ca\u5e76\u5ffd\u7565\u3002\u6ce8\u91ca\u4e5f\u53ef\u4ee5\u653e\u5728\u5bf9\u8c61\u5339\u914d\u6a21\u5f0f\u884c\u4e4b\u540e\u3002\u7a7a\u767d\u884c\u540c\u6837\u4f1a\u88ab\u5ffd\u7565\u3002\u6709\u5173\u5982\u4f55\u5728\u5339\u914d\u6a21\u5f0f\u4e2d\u52a0\u5f15\u53f7\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8<code class=\"command\">COMMENT</code>\u547d\u4ee4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-policies</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-schema</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sequence-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 <code class=\"option\">--no-data</code>\u3001<code class=\"option\">--schema-only</code> \u6216 <code class=\"option\">--statistics-only</code>\uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/18/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u5f53\u6307\u5b9a\u4e86<code class=\"option\">--statistics</code>\u65f6\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u5728\u751f\u6210\u7684\u8f6c\u50a8\u6587\u4ef6\u4e2d\u5305\u542b\u5927\u591a\u6570\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u5e76\u4e0d\u5305\u62ec\u6240\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u4f8b\u5982\u901a\u8fc7<a class=\"xref\" href=\"/docs/18/sql-createstatistics.html\" title=\"CREATE STATISTICS\"><span class=\"refentrytitle\">CREATE STATISTICS</span></a>\u663e\u5f0f\u521b\u5efa\u7684\u7edf\u8ba1\u4fe1\u606f\u3001\u6269\u5c55\u6dfb\u52a0\u7684\u81ea\u5b9a\u4e49\u7edf\u8ba1\u4fe1\u606f\uff0c\u6216\u7d2f\u79ef\u7edf\u8ba1\u7cfb\u7edf\u6536\u96c6\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u56e0\u6b64\uff0c\u5728\u4ece\u8f6c\u50a8\u6587\u4ef6\u6062\u590d\u540e\uff0c\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u518d\u8fd0\u884c<code class=\"command\">ANALYZE</code>\u4ee5\u786e\u4fdd\u6700\u4f73\u6027\u80fd\uff0c\u4ecd\u7136\u53ef\u80fd\u6709\u76ca\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "9b286b5bbf3f8f0e2224d989bb0eee3288a6be38e56dcb3734a8b43a5f82469c", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[79]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[83]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[85]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[87]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[89]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[91]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[93]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Client applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/tables/1/title": "Environment variables", "/versions/18/related/0/label": "libpq connection parameters", "/versions/18/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions) or statistics.", "/versions/18/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/18/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/18/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/18/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/18/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/18/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/18/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/18/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/18/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/18/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/18/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/18/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/18/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/18/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/18/tables/0/rows/16/summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/18/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/18/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/18/tables/0/rows/19/summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "/versions/18/tables/0/rows/20/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/18/tables/0/rows/21/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/18/tables/0/rows/22/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/18/tables/0/rows/23/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/18/tables/0/rows/24/summary": "Do not dump COMMENT commands.", "/versions/18/tables/0/rows/25/summary": "Do not dump data.", "/versions/18/tables/0/rows/26/summary": "Do not dump row security policies.", "/versions/18/tables/0/rows/27/summary": "Do not dump publications.", "/versions/18/tables/0/rows/28/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/18/tables/0/rows/29/summary": "Do not dump schema (data definitions).", "/versions/18/tables/0/rows/30/summary": "Do not dump security labels.", "/versions/18/tables/0/rows/31/summary": "Do not dump statistics. This is the default.", "/versions/18/tables/0/rows/32/summary": "Do not dump subscriptions.", "/versions/18/tables/0/rows/33/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/18/tables/0/rows/34/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/18/tables/0/rows/35/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/18/tables/0/rows/36/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/18/tables/0/rows/37/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/18/tables/0/rows/38/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/18/tables/0/rows/39/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/18/tables/0/rows/40/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/18/tables/0/rows/41/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/18/tables/0/rows/42/summary": "Dump optimizer statistics.", "/versions/18/tables/0/rows/43/summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "/versions/18/tables/0/rows/44/summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "/versions/18/tables/0/rows/45/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/18/tables/0/rows/46/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/18/tables/0/rows/47/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/18/tables/0/rows/48/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/18/tables/0/rows/49/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/18/tables/0/rows/50/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/18/tables/0/rows/51/summary": "User name to connect as.", "/versions/18/tables/0/rows/52/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/18/tables/0/rows/53/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/18/tables/0/rows/54/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/18/tables/1/columns/0/label": "Variable", "/versions/18/tables/1/columns/1/label": "Meaning", "/versions/18/tables/1/rows/0/description": "Default connection parameters", "/versions/18/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "57b1f95d97242efc5f80ae1c058c4f86535acf847f436872796771f25567f864"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "signature": "--filter= filename", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "signature": "--no-data", "description": "Do not dump data."}, {"names": ["--no-policies"], "signature": "--no-policies", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "signature": "--no-schema", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "signature": "--no-statistics", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "signature": "--statistics", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "signature": "--statistics-only", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "signature": "--sequence-data", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dd0edf9a9ef6de0e86b97b0a2b08127ecf99f382528014ef50f210767b2d4f6c", "manual_language": "zh"}, "19": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "19beta4"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "55"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e --exclude-database \u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece STDIN \u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528 - \u4f5c\u4e3a\u6587\u4ef6\u540d\u3002 --filter \u53ef\u4e0e --exclude-database \u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--filter= filename"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8 COMMENT \u547d\u4ee4\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-data"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-policies"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-schema"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-statistics"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--statistics"}}, {"summary": "\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--statistics-only"}}, {"summary": "\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 --no-data \u3001 --schema-only \u6216 --statistics-only \uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--sequence-data"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/19/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions) or statistics.", "signature": "-a --data-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/19/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/19/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/19/app-pg-dumpall.html", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "signature": "--filter= filename", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/19/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump COMMENT commands.", "signature": "--no-comments", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "summary": "Do not dump data.", "signature": "--no-data", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump data."}, {"names": ["--no-policies"], "summary": "Do not dump row security policies.", "signature": "--no-policies", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "summary": "Do not dump schema (data definitions).", "signature": "--no-schema", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "summary": "Do not dump statistics. This is the default.", "signature": "--no-statistics", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/19/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "summary": "Dump optimizer statistics.", "signature": "--statistics", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "signature": "--statistics-only", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "signature": "--sequence-data", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/19/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/19/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=19", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "label": "19beta4", "major": "19", "channel": "preview", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/19/postgresql-19-A4.pdf", "bytes": 16064841, "pages": 3052, "sha256": "4dd099e4125c591128fc5f3ebd02178dc24781f9e5ae629f96d67c4c8547427b", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/19/postgresql-19-US.pdf", "bytes": 15974616, "pages": 3225, "sha256": "61971fa857f0956d47341a0388fa6af9ae10acf691d4b2fc009007d384b0342b", "built_at": "2026-09-26"}}, "tree": "19", "index": "index.html", "major": "19", "pages": 1155, "release": "19beta4", "source_url": "https://ftp.postgresql.org/pub/source/v19beta4/postgresql-19beta4.tar.bz2", "svg_assets": 5, "source_mode": "en SGML built with pinned official archive", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "revision": "1bbbbf4133d426f0e4304010688d2984c30fb67df0cc3a61b3e37eb3f6f37833", "evidence_kind": "English manual and source declarations", "source_sha256": "83157ee9c599d03b2f7a3d73ef3a56ec24e0e79cc2b3501a64d1364f56398c86"}, "sources": [{"url": "https://pg.center/docs/19/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "19beta4 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "1b13ec00b843b047aa39166330c02218809958c20afb6df5b5baf83fdfaacbd8", "language": "en", "original_url": "/docs/19/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/19/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "c827f460db781b39da305303c88e73729a419cd2b2b9dedb126d8ad5cbf02c95", "language": "en", "original_url": "/docs/19/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.15.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/19/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/19/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/19/libpq-pgpass.html\" title=\"32.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a032.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/19/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--filter=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e<code class=\"option\">--exclude-database</code>\u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece<code class=\"literal\">STDIN</code>\u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528<code class=\"filename\">-</code>\u4f5c\u4e3a\u6587\u4ef6\u540d\u3002<code class=\"option\">--filter</code>\u53ef\u4e0e<code class=\"option\">--exclude-database</code>\u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002</p>\n<p lang=\"zh\">\u8be5\u6587\u4ef6\u6bcf\u884c\u5217\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u5339\u914d\u6a21\u5f0f\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a</p>\n<pre class=\"synopsis\">exclude database <em class=\"replaceable\"><code>PATTERN</code></em>\n</pre>\n<p lang=\"zh\">\u4ee5 <code class=\"literal\">#</code> \u5f00\u5934\u7684\u884c\u88ab\u89c6\u4e3a\u6ce8\u91ca\u5e76\u5ffd\u7565\u3002\u6ce8\u91ca\u4e5f\u53ef\u4ee5\u653e\u5728\u5bf9\u8c61\u5339\u914d\u6a21\u5f0f\u884c\u4e4b\u540e\u3002\u7a7a\u767d\u884c\u540c\u6837\u4f1a\u88ab\u5ffd\u7565\u3002\u6709\u5173\u5982\u4f55\u5728\u5339\u914d\u6a21\u5f0f\u4e2d\u52a0\u5f15\u53f7\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8<code class=\"command\">COMMENT</code>\u547d\u4ee4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-policies</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-schema</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sequence-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 <code class=\"option\">--no-data</code>\u3001<code class=\"option\">--schema-only</code> \u6216 <code class=\"option\">--statistics-only</code>\uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/19/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/19/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u5f53\u6307\u5b9a\u4e86<code class=\"option\">--statistics</code>\u65f6\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u5728\u751f\u6210\u7684\u8f6c\u50a8\u6587\u4ef6\u4e2d\u5305\u542b\u5927\u591a\u6570\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u5e76\u4e0d\u5305\u62ec\u6240\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u4f8b\u5982\u6269\u5c55\u6dfb\u52a0\u7684\u81ea\u5b9a\u4e49\u7edf\u8ba1\u4fe1\u606f\uff0c\u6216\u7d2f\u79ef\u7edf\u8ba1\u7cfb\u7edf\u6536\u96c6\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u56e0\u6b64\uff0c\u5728\u4ece\u8f6c\u50a8\u6587\u4ef6\u6062\u590d\u540e\uff0c\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u518d\u8fd0\u884c<code class=\"command\">ANALYZE</code>\u4ee5\u786e\u4fdd\u6700\u4f73\u6027\u80fd\uff0c\u4ecd\u7136\u53ef\u80fd\u6709\u76ca\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/19/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/19/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "565bc22363422b03f8ce2d384add56223c9c5f9b726b5b9a585b04d47d6e66f8", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[79]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[83]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[85]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[87]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[89]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[91]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[93]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/19/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/19/facts/0/label": "Documented executable", "/versions/19/facts/1/label": "Executable version", "/versions/19/facts/2/label": "Reference inventory", "/versions/19/facts/2/value": "Client applications", "/versions/19/facts/3/label": "Option definition groups", "/versions/19/tables/0/title": "Documented options", "/versions/19/tables/1/title": "Environment variables", "/versions/19/related/0/label": "libpq connection parameters", "/versions/19/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions) or statistics.", "/versions/19/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/19/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/19/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/19/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/19/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/19/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/19/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/19/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/19/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/19/tables/0/columns/0/label": "Option and arguments", "/versions/19/tables/0/columns/1/label": "Description", "/versions/19/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/19/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/19/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/19/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/19/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/19/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/19/tables/0/rows/16/summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/19/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/19/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/19/tables/0/rows/19/summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "/versions/19/tables/0/rows/20/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/19/tables/0/rows/21/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/19/tables/0/rows/22/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/19/tables/0/rows/23/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/19/tables/0/rows/24/summary": "Do not dump COMMENT commands.", "/versions/19/tables/0/rows/25/summary": "Do not dump data.", "/versions/19/tables/0/rows/26/summary": "Do not dump row security policies.", "/versions/19/tables/0/rows/27/summary": "Do not dump publications.", "/versions/19/tables/0/rows/28/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/19/tables/0/rows/29/summary": "Do not dump schema (data definitions).", "/versions/19/tables/0/rows/30/summary": "Do not dump security labels.", "/versions/19/tables/0/rows/31/summary": "Do not dump statistics. This is the default.", "/versions/19/tables/0/rows/32/summary": "Do not dump subscriptions.", "/versions/19/tables/0/rows/33/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/19/tables/0/rows/34/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/19/tables/0/rows/35/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/19/tables/0/rows/36/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/19/tables/0/rows/37/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/19/tables/0/rows/38/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/19/tables/0/rows/39/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/19/tables/0/rows/40/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/19/tables/0/rows/41/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/19/tables/0/rows/42/summary": "Dump optimizer statistics.", "/versions/19/tables/0/rows/43/summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "/versions/19/tables/0/rows/44/summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "/versions/19/tables/0/rows/45/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/19/tables/0/rows/46/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/19/tables/0/rows/47/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/19/tables/0/rows/48/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/19/tables/0/rows/49/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/19/tables/0/rows/50/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/19/tables/0/rows/51/summary": "User name to connect as.", "/versions/19/tables/0/rows/52/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/19/tables/0/rows/53/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/19/tables/0/rows/54/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/19/tables/1/columns/0/label": "Variable", "/versions/19/tables/1/columns/1/label": "Meaning", "/versions/19/tables/1/rows/0/description": "Default connection parameters", "/versions/19/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "db15063b85792d92255aee63057b5dab8ef1a6c1c23dffe51b73ee14f1a02783"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "signature": "--filter= filename", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "signature": "--no-data", "description": "Do not dump data."}, {"names": ["--no-policies"], "signature": "--no-policies", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "signature": "--no-schema", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "signature": "--no-statistics", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "signature": "--statistics", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "signature": "--statistics-only", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "signature": "--sequence-data", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dd0edf9a9ef6de0e86b97b0a2b08127ecf99f382528014ef50f210767b2d4f6c", "manual_language": "zh"}, "20": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "20devel"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "55"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e --exclude-database \u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece STDIN \u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528 - \u4f5c\u4e3a\u6587\u4ef6\u540d\u3002 --filter \u53ef\u4e0e --exclude-database \u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--filter= filename"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8 COMMENT \u547d\u4ee4\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-data"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-policies"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-schema"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-statistics"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--statistics"}}, {"summary": "\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--statistics-only"}}, {"summary": "\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 --no-data \u3001 --schema-only \u6216 --statistics-only \uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--sequence-data"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/devel/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions) or statistics.", "signature": "-a --data-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "signature": "--filter= filename", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump COMMENT commands.", "signature": "--no-comments", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "summary": "Do not dump data.", "signature": "--no-data", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump data."}, {"names": ["--no-policies"], "summary": "Do not dump row security policies.", "signature": "--no-policies", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "summary": "Do not dump schema (data definitions).", "signature": "--no-schema", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "summary": "Do not dump statistics. This is the default.", "signature": "--no-statistics", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "summary": "Dump optimizer statistics.", "signature": "--statistics", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "signature": "--statistics-only", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "signature": "--sequence-data", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/devel/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=20", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "label": "20devel", "major": "20", "channel": "devel", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/20/postgresql-20-A4.pdf", "bytes": 16030631, "pages": 3052, "sha256": "bd5d82c0ce38fc18f92a0447818a91a193a261776bca1c37564bf9a683e177d0", "built_at": "2026-09-28"}, "US": {"url": "/files/documentation/pdf/20/postgresql-20-US.pdf", "bytes": 15936613, "pages": 3223, "sha256": "d97d9e0db479a02f4234b175f50fcad70c3661619afc8d6df9b9437882e3c299", "built_at": "2026-09-28"}}, "tree": "0", "index": "index.html", "major": "20", "pages": 1156, "release": "20devel", "source_url": "https://ftp.postgresql.org/pub/snapshot/dev/postgresql-snapshot.tar.bz2", "svg_assets": 6, "source_mode": "en SGML built with pinned official archive", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41", "source_snapshot_utc": "26-Sep-2026 20:22"}, "revision": "2eba5e0fd4c3bffb2803247b6cd537878e9d6ee5a6dfbe3c50ece8b421b80918", "evidence_kind": "English manual and source declarations", "source_sha256": "4d3346909b201ac1648232cf290462a7070c119326f56196f1f0253ed80fae41"}, "sources": [{"url": "https://pg.center/docs/devel/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "20devel English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "b671f4c9d49e1e9b6656709e4c50892e93ec89a08e4f097f93c3c863663e2dc9", "language": "en", "original_url": "/docs/devel/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/devel/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "a6c7ba748fa1d9feac5bb7cde41d1d36a1f4c26d5963e07fb103d02918b2a8ca", "language": "en", "original_url": "/docs/devel/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.15.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/devel/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/devel/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/devel/libpq-pgpass.html\" title=\"32.15.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a032.15\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--filter=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e<code class=\"option\">--exclude-database</code>\u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece<code class=\"literal\">STDIN</code>\u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528<code class=\"filename\">-</code>\u4f5c\u4e3a\u6587\u4ef6\u540d\u3002<code class=\"option\">--filter</code>\u53ef\u4e0e<code class=\"option\">--exclude-database</code>\u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002</p>\n<p lang=\"zh\">\u8be5\u6587\u4ef6\u6bcf\u884c\u5217\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u5339\u914d\u6a21\u5f0f\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a</p>\n<pre class=\"synopsis\">exclude database <em class=\"replaceable\"><code>PATTERN</code></em>\n</pre>\n<p lang=\"zh\">\u4ee5 <code class=\"literal\">#</code> \u5f00\u5934\u7684\u884c\u88ab\u89c6\u4e3a\u6ce8\u91ca\u5e76\u5ffd\u7565\u3002\u6ce8\u91ca\u4e5f\u53ef\u4ee5\u653e\u5728\u5bf9\u8c61\u5339\u914d\u6a21\u5f0f\u884c\u4e4b\u540e\u3002\u7a7a\u767d\u884c\u540c\u6837\u4f1a\u88ab\u5ffd\u7565\u3002\u6709\u5173\u5982\u4f55\u5728\u5339\u914d\u6a21\u5f0f\u4e2d\u52a0\u5f15\u53f7\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8<code class=\"command\">COMMENT</code>\u547d\u4ee4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-policies</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-schema</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sequence-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 <code class=\"option\">--no-data</code>\u3001<code class=\"option\">--schema-only</code> \u6216 <code class=\"option\">--statistics-only</code>\uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/devel/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/devel/libpq-envars.html\" title=\"32.14.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.14\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u5f53\u6307\u5b9a\u4e86<code class=\"option\">--statistics</code>\u65f6\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u5728\u751f\u6210\u7684\u8f6c\u50a8\u6587\u4ef6\u4e2d\u5305\u542b\u5927\u591a\u6570\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u5e76\u4e0d\u5305\u62ec\u6240\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u4f8b\u5982\u6269\u5c55\u6dfb\u52a0\u7684\u81ea\u5b9a\u4e49\u7edf\u8ba1\u4fe1\u606f\uff0c\u6216\u7d2f\u79ef\u7edf\u8ba1\u7cfb\u7edf\u6536\u96c6\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u56e0\u6b64\uff0c\u5728\u4ece\u8f6c\u50a8\u6587\u4ef6\u6062\u590d\u540e\uff0c\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u518d\u8fd0\u884c<code class=\"command\">ANALYZE</code>\u4ee5\u786e\u4fdd\u6700\u4f73\u6027\u80fd\uff0c\u4ecd\u7136\u53ef\u80fd\u6709\u76ca\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/devel/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/devel/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "d1d4c09c90608487c8368aef6cf26b503c6a8cbc1c264e8e23253c5328b4b23c", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[79]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[83]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[85]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[87]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[89]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[91]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[93]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/summary": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/category": "Client applications", "/versions/20/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/20/facts/0/label": "Documented executable", "/versions/20/facts/1/label": "Executable version", "/versions/20/facts/2/label": "Reference inventory", "/versions/20/facts/2/value": "Client applications", "/versions/20/facts/3/label": "Option definition groups", "/versions/20/tables/0/title": "Documented options", "/versions/20/tables/1/title": "Environment variables", "/versions/20/related/0/label": "libpq connection parameters", "/versions/20/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions) or statistics.", "/versions/20/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/20/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/20/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/20/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/20/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/20/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/20/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/20/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/20/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/20/tables/0/columns/0/label": "Option and arguments", "/versions/20/tables/0/columns/1/label": "Description", "/versions/20/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/20/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/20/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/20/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/20/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/20/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/20/tables/0/rows/16/summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/20/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/20/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/20/tables/0/rows/19/summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "/versions/20/tables/0/rows/20/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/20/tables/0/rows/21/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/20/tables/0/rows/22/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/20/tables/0/rows/23/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/20/tables/0/rows/24/summary": "Do not dump COMMENT commands.", "/versions/20/tables/0/rows/25/summary": "Do not dump data.", "/versions/20/tables/0/rows/26/summary": "Do not dump row security policies.", "/versions/20/tables/0/rows/27/summary": "Do not dump publications.", "/versions/20/tables/0/rows/28/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/20/tables/0/rows/29/summary": "Do not dump schema (data definitions).", "/versions/20/tables/0/rows/30/summary": "Do not dump security labels.", "/versions/20/tables/0/rows/31/summary": "Do not dump statistics. This is the default.", "/versions/20/tables/0/rows/32/summary": "Do not dump subscriptions.", "/versions/20/tables/0/rows/33/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/20/tables/0/rows/34/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/20/tables/0/rows/35/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/20/tables/0/rows/36/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/20/tables/0/rows/37/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/20/tables/0/rows/38/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/20/tables/0/rows/39/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/20/tables/0/rows/40/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/20/tables/0/rows/41/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/20/tables/0/rows/42/summary": "Dump optimizer statistics.", "/versions/20/tables/0/rows/43/summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "/versions/20/tables/0/rows/44/summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "/versions/20/tables/0/rows/45/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/20/tables/0/rows/46/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/20/tables/0/rows/47/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/20/tables/0/rows/48/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/20/tables/0/rows/49/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/20/tables/0/rows/50/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/20/tables/0/rows/51/summary": "User name to connect as.", "/versions/20/tables/0/rows/52/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/20/tables/0/rows/53/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/20/tables/0/rows/54/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/20/tables/1/columns/0/label": "Variable", "/versions/20/tables/1/columns/1/label": "Meaning", "/versions/20/tables/1/rows/0/description": "Default connection parameters", "/versions/20/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "0fe3198437173f6153cbb9d983f60ac6905ebcda75f33733a31acfd43699b73b"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "signature": "--filter= filename", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "signature": "--no-data", "description": "Do not dump data."}, {"names": ["--no-policies"], "signature": "--no-policies", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "signature": "--no-schema", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "signature": "--no-statistics", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "signature": "--statistics", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "signature": "--statistics-only", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "signature": "--sequence-data", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dd0edf9a9ef6de0e86b97b0a2b08127ecf99f382528014ef50f210767b2d4f6c", "manual_language": "zh"}}}, "snapshot": {"facts": [{"label": "\u624b\u518c\u4e2d\u7684\u53ef\u6267\u884c\u7a0b\u5e8f", "value": "pg_dumpall"}, {"label": "\u7a0b\u5e8f\u7248\u672c", "value": "18.6"}, {"label": "\u53c2\u8003\u6e05\u5355", "value": "\u5ba2\u6237\u7aef\u7a0b\u5e8f"}, {"label": "\u9009\u9879\u5b9a\u4e49\u7ec4", "value": "55"}], "tables": [{"key": "options", "rows": [{"summary": "\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-a --data-only"}}, {"summary": "\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e DROP \u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86 --if-exists \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-c --clean"}}, {"summary": "\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06 PGCLIENTENCODING \u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-E encoding --encoding= encoding"}}, {"summary": "\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-f filename --file= filename"}}, {"summary": "\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-g --globals-only"}}, {"summary": "\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u53d1\u51fa ALTER OWNER \u6216 SET SESSION AUTHORIZATION \u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a -O \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-O --no-owner"}}, {"summary": "\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-r --roles-only"}}, {"summary": "\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-s --schema-only"}}, {"summary": "\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 --disable-triggers \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-S username --superuser= username"}}, {"summary": "\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-t --tablespaces-only"}}, {"summary": "\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9 pg_dumpall \u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9 pg_dump \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-v --verbose"}}, {"summary": "\u6253\u5370 pg_dumpall \u7684\u7248\u672c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-V --version"}}, {"summary": "\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-x --no-privileges --no-acl"}}, {"summary": "\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--binary-upgrade"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684 INSERT \u547d\u4ee4\uff08 INSERT INTO table ( column , ...) VALUES ... \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--column-inserts --attribute-inserts"}}, {"summary": "\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--disable-dollar-quoting"}}, {"summary": "\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a pg_dumpall \u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--disable-triggers"}}, {"summary": "\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d pattern \u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199 --exclude-database \u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002 pattern \u53c2\u6570\u6309\u7167 psql \u7684 \\d \u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1 \u6a21\u5f0f \uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--exclude-database= pattern"}}, {"summary": "\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--extra-float-digits= ndigits"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e --exclude-database \u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece STDIN \u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528 - \u4f5c\u4e3a\u6587\u4ef6\u540d\u3002 --filter \u53ef\u4e0e --exclude-database \u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--filter= filename"}}, {"summary": "\u4f7f\u7528 DROP ... IF EXISTS \u547d\u4ee4\u5728 --clean \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684 \u201c does not exist \u201d \u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 --clean \uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--if-exists"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e PostgreSQL \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002 --column-inserts \u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--inserts"}}, {"summary": "\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9 COPY \u6216 INSERT \u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--load-via-partition-root"}}, {"summary": "\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684 timeout \u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528 SET statement_timeout \u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--lock-wait-timeout= timeout"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8 COMMENT \u547d\u4ee4\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-comments"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-data"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-policies"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-publications"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe pg_roles \u800c\u4e0d\u662f pg_authid \u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9 pg_authid \u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-role-passwords"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-schema"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-security-labels"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-statistics"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-subscriptions"}}, {"summary": "\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f pg_dumpall \u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-sync"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-table-access-method"}}, {"summary": "\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-tablespaces"}}, {"summary": "\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e TOAST \u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-toast-compression"}}, {"summary": "\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--no-unlogged-table-data"}}, {"summary": "\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--on-conflict-do-nothing"}}, {"summary": "\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176 PostgreSQL \u4e3b\u7248\u672c\u4e0e pg_dumpall \u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c pg_dumpall \u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 --quote-all-identifiers \u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--quote-all-identifiers"}}, {"summary": "\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c psql \u7684 \\restrict \u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c pg_dumpall \u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--restrict-key= restrict_key"}}, {"summary": "\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a INSERT \u547d\u4ee4\uff08\u800c\u4e0d\u662f COPY \uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a INSERT \u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684 INSERT \u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--rows-per-insert= nrows"}}, {"summary": "\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--statistics"}}, {"summary": "\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--statistics-only"}}, {"summary": "\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 --no-data \u3001 --schema-only \u6216 --statistics-only \uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--sequence-data"}}, {"summary": "\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684 SET SESSION AUTHORIZATION \u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528 ALTER OWNER \u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--use-set-session-authorization"}}, {"summary": "\u663e\u793a\u5173\u4e8e pg_dumpall \u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-? --help"}}, {"summary": "\u4ee5 \u8fde\u63a5\u5b57\u7b26\u4e32 \u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-d connstr --dbname= connstr"}}, {"summary": "\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGHOST \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-h host --host= host"}}, {"summary": "\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528 postgres \u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528 template1 \u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-l dbname --database= dbname"}}, {"summary": "\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea PGPORT \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-p port --port= port"}}, {"summary": "\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-U username --username= username"}}, {"summary": "\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 .pgpass \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-w --no-password"}}, {"summary": "\u5f3a\u5236 pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "-W --password"}}, {"summary": "\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f pg_dumpall \u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa SET ROLE rolename \u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531 -U \u6307\u5b9a\uff09\u7f3a\u5c11 pg_dumpall \u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002", "signature": {"url": "/docs/18/app-pg-dumpall.html", "text": "--role= rolename"}}], "title": "\u624b\u518c\u4e2d\u7684\u9009\u9879", "columns": [{"key": "signature", "label": "\u9009\u9879\u4e0e\u53c2\u6570"}, {"key": "summary", "label": "\u8bf4\u660e"}]}, {"key": "environment", "rows": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570"}, {"name": "PG_COLOR", "description": "\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a always \u3001 auto \u548c never \u3002"}], "title": "\u73af\u5883\u53d8\u91cf", "columns": [{"key": "name", "label": "\u53d8\u91cf"}, {"key": "description", "label": "\u542b\u4e49"}]}], "options": [{"names": ["-a", "--data-only"], "summary": "Dump only the data, not the schema (data definitions) or statistics.", "signature": "-a --data-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "signature": "-c --clean", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "signature": "-E encoding --encoding= encoding", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "summary": "Send output to the specified file. If this is omitted, the standard output is used.", "signature": "-f filename --file= filename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "summary": "Dump only global objects (roles and tablespaces), no databases.", "signature": "-g --globals-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "signature": "-O --no-owner", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "summary": "Dump only roles, no databases or tablespaces.", "signature": "-r --roles-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "summary": "Dump only the object definitions (schema), not data.", "signature": "-s --schema-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "signature": "-S username --superuser= username", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "summary": "Dump only tablespaces, no databases or roles.", "signature": "-t --tablespaces-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "signature": "-v --verbose", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "summary": "Print the pg_dumpall version and exit.", "signature": "-V --version", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "summary": "Prevent dumping of access privileges (grant/revoke commands).", "signature": "-x --no-privileges --no-acl", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "signature": "--binary-upgrade", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "signature": "--column-inserts --attribute-inserts", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "signature": "--disable-dollar-quoting", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "signature": "--disable-triggers", "source_url": "/docs/18/app-pg-dumpall.html", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "signature": "--exclude-database= pattern", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "signature": "--extra-float-digits= ndigits", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "signature": "--filter= filename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "signature": "--if-exists", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "signature": "--inserts", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "signature": "--load-via-partition-root", "source_url": "/docs/18/app-pg-dumpall.html", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "signature": "--lock-wait-timeout= timeout", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "summary": "Do not dump COMMENT commands.", "signature": "--no-comments", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "summary": "Do not dump data.", "signature": "--no-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump data."}, {"names": ["--no-policies"], "summary": "Do not dump row security policies.", "signature": "--no-policies", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "summary": "Do not dump publications.", "signature": "--no-publications", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "signature": "--no-role-passwords", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "summary": "Do not dump schema (data definitions).", "signature": "--no-schema", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "summary": "Do not dump security labels.", "signature": "--no-security-labels", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "summary": "Do not dump statistics. This is the default.", "signature": "--no-statistics", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "summary": "Do not dump subscriptions.", "signature": "--no-subscriptions", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "signature": "--no-sync", "source_url": "/docs/18/app-pg-dumpall.html", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "signature": "--no-table-access-method", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "signature": "--no-tablespaces", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "signature": "--no-toast-compression", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "signature": "--no-unlogged-table-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "signature": "--on-conflict-do-nothing", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "signature": "--quote-all-identifiers", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "signature": "--restrict-key= restrict_key", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "signature": "--rows-per-insert= nrows", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "summary": "Dump optimizer statistics.", "signature": "--statistics", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "signature": "--statistics-only", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "signature": "--sequence-data", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "signature": "--use-set-session-authorization", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "summary": "Show help about pg_dumpall command line arguments, and exit.", "signature": "-? --help", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "signature": "-d connstr --dbname= connstr", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "signature": "-h host --host= host", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "signature": "-l dbname --database= dbname", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "signature": "-p port --port= port", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "summary": "User name to connect as.", "signature": "-U username --username= username", "source_url": "/docs/18/app-pg-dumpall.html", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "signature": "-w --no-password", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "signature": "-W --password", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "signature": "--role= rolename", "source_url": "/docs/18/app-pg-dumpall.html", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "related": [{"url": "/wiki/conn/?v=18", "label": "libpq \u8fde\u63a5\u53c2\u6570"}], "release": {"ref": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "label": "18.6", "major": "18", "channel": "stable", "manifest": {"pdf": {"A4": {"url": "/files/documentation/pdf/18/postgresql-18-A4.pdf", "bytes": 15865106, "pages": 3154, "sha256": "19512c405da53f9f7fcf0abba359223aa65f021be025bf3411381918f92e3190", "built_at": "2026-09-26"}, "US": {"url": "/files/documentation/pdf/18/postgresql-18-US.pdf", "bytes": 15748059, "pages": 3328, "sha256": "facbe6c229e598b872d3d98bef53308f46e06746006fa4590de9a7de9dd46319", "built_at": "2026-09-26"}}, "tree": "18", "index": "index.html", "major": "18", "pages": 1148, "release": "18.6", "source_url": "https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2", "svg_assets": 3, "source_mode": "en SGML built with pinned official archive", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "revision": "ee8d1a3612338fd9adf250730cb640fcc5233b5491337cc00a316a44e3a0b9f8", "evidence_kind": "English manual and source declarations", "source_sha256": "555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f"}, "sources": [{"url": "https://pg.center/docs/18/app-pg-dumpall.html", "file": "app-pg-dumpall.html", "label": "18.6 English manual \u00b7 app-pg-dumpall.html", "anchor": "", "sha256": "5f64e2921cefa4823764e46860b95e0f5f7568192670220a0bac10314c740683", "language": "en", "original_url": "/docs/18/app-pg-dumpall.html"}, {"url": "https://pg.center/docs/18/reference-client.html", "file": "reference-client.html", "label": "Client applications inventory", "anchor": "", "sha256": "68f726af77272fe73a827be2b7b5958d0f2239a6f8ed44264e9d42496bfa4fd0", "language": "en", "original_url": "/docs/18/reference-client.html"}], "sections": [], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "signature": "pg_dumpall [ connection-option ...] [ option ...]", "description": ["pg_dumpall \u2014 \u5c06\u4e00\u4e2a PostgreSQL \u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}], "manual_html": "<div><div class=\"refentry\" id=\"APP-PG-DUMPALL\">\n<div class=\"titlepage\"></div>\n<div class=\"refnamediv\">\n<h2><span class=\"refentrytitle\"><span class=\"application\">pg_dumpall</span></span></h2>\n<p lang=\"zh\">pg_dumpall \u2014 \u5c06\u4e00\u4e2a<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u96c6\u7c07\u8f6c\u50a8\u4e3a\u811a\u672c\u6587\u4ef6</p>\n</div>\n<div class=\"refsynopsisdiv\">\n<h2 lang=\"zh\">\u5927\u7eb2</h2>\n<div class=\"cmdsynopsis\">\n<p id=\"id-1.9.4.15.4.1\"><code class=\"command\">pg_dumpall</code> [<em class=\"replaceable\"><code>connection-option</code></em>...] [<em class=\"replaceable\"><code>option</code></em>...]</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-DESCRIPTION\">\n<h2 lang=\"zh\">\u8bf4\u660e</h2>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u662f\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u5199\u51fa\uff08<span class=\"quote\">\u201c<span class=\"quote\">\u8f6c\u50a8</span>\u201d</span>\uff09\u4e00\u4e2a\u96c6\u7c07\u4e2d\u7684\u6240\u6709<span class=\"productname\">PostgreSQL</span>\u6570\u636e\u5e93\u5230\u4e00\u4e2a\u811a\u672c\u6587\u4ef6\u4e2d\u3002\u8be5\u811a\u672c\u6587\u4ef6\u5305\u542b<acronym class=\"acronym\">SQL</acronym>\u547d\u4ee4\uff0c\u53ef\u4f5c\u4e3a<a class=\"xref\" href=\"/docs/18/app-psql.html\" title=\"psql\"><span class=\"refentrytitle\"><span class=\"application\">psql</span></span></a>\u7684\u8f93\u5165\u6765\u6062\u590d\u8fd9\u4e9b\u6570\u636e\u5e93\u3002\u5b83\u901a\u8fc7\u5bf9\u96c6\u7c07\u4e2d\u7684\u6bcf\u4e2a\u6570\u636e\u5e93\u8c03\u7528<a class=\"xref\" href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\u3002<span class=\"application\">pg_dumpall</span>\u8fd8\u4f1a\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\u5171\u6709\u7684\u5168\u5c40\u5bf9\u8c61\uff0c\u5373\u6570\u636e\u5e93\u89d2\u8272\u3001\u8868\u7a7a\u95f4\u4ee5\u53ca\u914d\u7f6e\u53c2\u6570\u7684\u6743\u9650\u6388\u4e88\u3002\uff08<span class=\"application\">pg_dump</span>\u4e0d\u4f1a\u4fdd\u5b58\u8fd9\u4e9b\u5bf9\u8c61\u3002\uff09</p>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u4f1a\u8bfb\u53d6\u6240\u6709\u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u56e0\u6b64\u901a\u5e38\u5fc5\u987b\u4ee5\u6570\u636e\u5e93\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fde\u63a5\uff0c\u624d\u80fd\u751f\u6210\u5b8c\u6574\u7684\u8f6c\u50a8\u3002\u53e6\u5916\uff0c\u8981\u6267\u884c\u4fdd\u5b58\u7684\u811a\u672c\uff0c\u4e5f\u9700\u8981\u5177\u5907\u8d85\u7ea7\u7528\u6237\u6743\u9650\uff0c\u8fd9\u6837\u624d\u80fd\u6dfb\u52a0\u89d2\u8272\u5e76\u521b\u5efa\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">SQL \u811a\u672c\u5c06\u5199\u5165\u6807\u51c6\u8f93\u51fa\u3002\u4f7f\u7528<code class=\"option\">-f</code>/<code class=\"option\">--file</code>\u9009\u9879\u6216 shell \u64cd\u4f5c\u7b26\u5c06\u5176\u91cd\u5b9a\u5411\u5230\u6587\u4ef6\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u9700\u8981\u591a\u6b21\u8fde\u63a5\u5230<span class=\"productname\">PostgreSQL</span>\u670d\u52a1\u5668\uff08\u6bcf\u4e2a\u6570\u636e\u5e93\u4e00\u6b21\uff09\u3002\u5982\u679c\u4f7f\u7528\u5bc6\u7801\u8ba4\u8bc1\uff0c\u5b83\u6bcf\u6b21\u90fd\u4f1a\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u51c6\u5907\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\u4f1a\u6bd4\u8f83\u65b9\u4fbf\u3002\u8be6\u89c1<a class=\"xref\" href=\"/docs/18/libpq-pgpass.html\" title=\"32.16.\u00a0\u5bc6\u7801\u6587\u4ef6\">\u7b2c\u00a032.16\u00a0\u8282</a>\u3002</p>\n<div class=\"warning\">\n<h3 class=\"title\" lang=\"zh\">\u8b66\u544a</h3>\n<p lang=\"zh\">\u6062\u590d\u8f6c\u50a8\u4f1a\u5bfc\u81f4\u76ee\u6807\u7cfb\u7edf\u6267\u884c\u7531\u6e90\u8d85\u7ea7\u7528\u6237\u6240\u9009\u62e9\u7684\u4efb\u610f\u4ee3\u7801\u3002\u90e8\u5206\u8f6c\u50a8\u548c\u90e8\u5206\u6062\u590d\u4e5f\u65e0\u6cd5\u9650\u5236\u8fd9\u4e00\u70b9\u3002\u5982\u679c\u4e0d\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\uff0c\u5219\u5728\u6062\u590d\u524d\u5fc5\u987b\u68c0\u67e5\u8f6c\u50a8\u51fa\u7684 SQL \u8bed\u53e5\u3002\u6ce8\u610f\uff0c\u6267\u884c\u8f6c\u50a8\u548c\u6062\u590d\u7684\u5ba2\u6237\u7aef\u5e76\u4e0d\u9700\u8981\u4fe1\u4efb\u6e90\u8d85\u7ea7\u7528\u6237\u6216\u76ee\u6807\u8d85\u7ea7\u7528\u6237\u3002</p>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.6\">\n<h2 lang=\"zh\">\u9009\u9879</h2>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u8f93\u51fa\u7684\u5185\u5bb9\u548c\u683c\u5f0f\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-a</code><br/></span><span class=\"term\"><code class=\"option\">--data-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u6570\u636e\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-c</code><br/></span><span class=\"term\"><code class=\"option\">--clean</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u91cd\u65b0\u521b\u5efa\u4e4b\u524d\uff0c\u8f93\u51fa\u7528\u4e8e<code class=\"command\">DROP</code>\u6240\u6709\u5df2\u8f6c\u50a8\u6570\u636e\u5e93\u3001\u89d2\u8272\u548c\u8868\u7a7a\u95f4\u7684 SQL \u547d\u4ee4\u3002\u5f53\u6062\u590d\u9700\u8981\u8986\u76d6\u73b0\u6709\u96c6\u7c07\u65f6\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002\u5982\u679c\u76ee\u6807\u96c6\u7c07\u4e2d\u4e0d\u5b58\u5728\u67d0\u4e9b\u5bf9\u8c61\uff0c\u5219\u6062\u590d\u671f\u95f4\u4f1a\u62a5\u544a\u53ef\u5ffd\u7565\u7684\u9519\u8bef\u6d88\u606f\uff0c\u9664\u975e\u8fd8\u6307\u5b9a\u4e86<code class=\"option\">--if-exists</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-E <em class=\"replaceable\"><code>encoding</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--encoding=<em class=\"replaceable\"><code>encoding</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u6307\u5b9a\u7684\u5b57\u7b26\u96c6\u7f16\u7801\u4e2d\u521b\u5efa\u8f6c\u50a8\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u50a8\u5c06\u4ee5\u6570\u636e\u5e93\u7f16\u7801\u521b\u5efa\u3002\uff08\u83b7\u5f97\u76f8\u540c\u7ed3\u679c\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u5c06<code class=\"envar\">PGCLIENTENCODING</code>\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u4e3a\u6240\u9700\u7684\u8f6c\u50a8\u7f16\u7801\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-f <em class=\"replaceable\"><code>filename</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--file=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u8f93\u51fa\u53d1\u9001\u5230\u6307\u5b9a\u6587\u4ef6\u3002\u5982\u679c\u7701\u7565\u6b64\u9009\u9879\uff0c\u5219\u4f7f\u7528\u6807\u51c6\u8f93\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-g</code><br/></span><span class=\"term\"><code class=\"option\">--globals-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\uff08\u89d2\u8272\u548c\u8868\u7a7a\u95f4\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-O</code><br/></span><span class=\"term\"><code class=\"option\">--no-owner</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f93\u51fa\u7528\u4e8e\u5c06\u5bf9\u8c61\u6240\u6709\u6743\u8bbe\u7f6e\u4e3a\u4e0e\u539f\u59cb\u6570\u636e\u5e93\u4e00\u81f4\u7684\u547d\u4ee4\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u53d1\u51fa<code class=\"command\">ALTER OWNER</code>\u6216<code class=\"command\">SET SESSION AUTHORIZATION</code>\u8bed\u53e5\uff0c\u4ee5\u8bbe\u7f6e\u5df2\u521b\u5efa\u6a21\u5f0f\u5143\u7d20\u7684\u6240\u6709\u6743\u3002\u9664\u975e\u8be5\u811a\u672c\u7531\u8d85\u7ea7\u7528\u6237\uff08\u6216\u62e5\u6709\u811a\u672c\u4e2d\u5168\u90e8\u5bf9\u8c61\u7684\u540c\u4e00\u7528\u6237\uff09\u542f\u52a8\uff0c\u5426\u5219\u8fd9\u4e9b\u8bed\u53e5\u5728\u8fd0\u884c\u65f6\u4f1a\u5931\u8d25\u3002\u82e5\u8981\u521b\u5efa\u4e00\u4e2a\u53ef\u7531\u4efb\u610f\u7528\u6237\u6062\u590d\u3001\u5e76\u8ba9\u8be5\u7528\u6237\u83b7\u5f97\u6240\u6709\u5bf9\u8c61\u6240\u6709\u6743\u7684\u811a\u672c\uff0c\u8bf7\u6307\u5b9a<code class=\"option\">-O</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-r</code><br/></span><span class=\"term\"><code class=\"option\">--roles-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u89d2\u8272\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u8868\u7a7a\u95f4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-s</code><br/></span><span class=\"term\"><code class=\"option\">--schema-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u5bf9\u8c61\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-S <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--superuser=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u5728\u7981\u7528\u89e6\u53d1\u5668\u65f6\u8981\u4f7f\u7528\u7684\u8d85\u7ea7\u7528\u6237\u540d\u3002\u8fd9\u53ea\u5728\u4f7f\u7528 <code class=\"option\">--disable-triggers</code> \u65f6\u76f8\u5173\u3002\uff08\u901a\u5e38\u6700\u597d\u7701\u7565\u5b83\uff0c\u800c\u662f\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002\uff09</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-t</code><br/></span><span class=\"term\"><code class=\"option\">--tablespaces-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u8868\u7a7a\u95f4\uff0c\u4e0d\u8f6c\u50a8\u6570\u636e\u5e93\u6216\u89d2\u8272\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-v</code><br/></span><span class=\"term\"><code class=\"option\">--verbose</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8be6\u7ec6\u6a21\u5f0f\u3002\u8fd9\u4f1a\u8ba9<span class=\"application\">pg_dumpall</span>\u628a\u5f00\u59cb/\u505c\u6b62\u65f6\u95f4\u5199\u5165\u8f6c\u50a8\u6587\u4ef6\uff0c\u5e76\u5c06\u8fdb\u5ea6\u6d88\u606f\u8f93\u51fa\u5230\u6807\u51c6\u9519\u8bef\u3002\u91cd\u590d\u6307\u5b9a\u8be5\u9009\u9879\u4f1a\u4f7f\u66f4\u591a\u8c03\u8bd5\u7ea7\u522b\u7684\u6d88\u606f\u51fa\u73b0\u5728\u6807\u51c6\u9519\u8bef\u4e2d\u3002\u8be5\u9009\u9879\u4e5f\u4f1a\u4f20\u9012\u7ed9<span class=\"application\">pg_dump</span>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-V</code><br/></span><span class=\"term\"><code class=\"option\">--version</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6253\u5370<span class=\"application\">pg_dumpall</span>\u7684\u7248\u672c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-x</code><br/></span><span class=\"term\"><code class=\"option\">--no-privileges</code><br/></span><span class=\"term\"><code class=\"option\">--no-acl</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u8bbf\u95ee\u6743\u9650\uff08GRANT/REVOKE \u547d\u4ee4\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--binary-upgrade</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u4f9b\u5c31\u5730\u5347\u7ea7\u5b9e\u7528\u7a0b\u5e8f\u4f7f\u7528\u3002\u4e0d\u5efa\u8bae\u4e5f\u4e0d\u652f\u6301\u5c06\u5176\u7528\u4e8e\u5176\u4ed6\u76ee\u7684\u3002\u8be5\u9009\u9879\u7684\u884c\u4e3a\u53ef\u80fd\u5728\u672a\u6765\u7684\u7248\u672c\u4e2d\u66f4\u6539\u800c\u4e0d\u53e6\u884c\u901a\u77e5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--column-inserts</code><br/></span><span class=\"term\"><code class=\"option\">--attribute-inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a\u5e26\u6709\u663e\u5f0f\u5217\u540d\u7684<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08<code class=\"literal\">INSERT INTO <em class=\"replaceable\"><code>table</code></em> (<em class=\"replaceable\"><code>column</code></em>, ...) VALUES ...</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u53d8\u5f97\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-dollar-quoting</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6b64\u9009\u9879\u7981\u7528\u5bf9\u51fd\u6570\u4f53\u7684\u7f8e\u5143\u5f15\u7528\uff0c\u5e76\u5f3a\u5236\u7528 SQL \u6807\u51c6\u5b57\u7b26\u4e32\u8bed\u6cd5\u5bf9\u5b83\u4eec\u52a0\u5f15\u53f7\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--disable-triggers</code></span></dt>\n<dd>\n<p lang=\"zh\">\u6b64\u9009\u9879\u53ea\u5728\u521b\u5efa\u5305\u542b\u6570\u636e\u4f46\u4e0d\u5305\u542b\u6a21\u5f0f\u7684\u8f6c\u50a8\u65f6\u624d\u76f8\u5173\u3002\u5b83\u6307\u793a<span class=\"application\">pg_dumpall</span>\u5728\u8f93\u51fa\u4e2d\u5305\u542b\u4e00\u4e9b\u547d\u4ee4\uff0c\u4ee5\u4fbf\u5728\u6062\u590d\u6570\u636e\u65f6\u4e34\u65f6\u7981\u7528\u76ee\u6807\u8868\u4e0a\u7684\u89e6\u53d1\u5668\u3002\u5982\u679c\u8fd9\u4e9b\u8868\u4e0a\u5b58\u5728\u4e0d\u5e0c\u671b\u5728\u6570\u636e\u6062\u590d\u671f\u95f4\u89e6\u53d1\u7684\u5f15\u7528\u5b8c\u6574\u6027\u68c0\u67e5\u6216\u5176\u4ed6\u89e6\u53d1\u5668\uff0c\u8bf7\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u76ee\u524d\uff0c\u4e3a <code class=\"option\">--disable-triggers</code> \u8f93\u51fa\u7684\u8fd9\u4e9b\u547d\u4ee4\u5fc5\u987b\u7531\u8d85\u7ea7\u7528\u6237\u6267\u884c\u3002\u56e0\u6b64\uff0c\u8fd8\u5e94\u901a\u8fc7 <code class=\"option\">-S</code> \u6307\u5b9a\u4e00\u4e2a\u8d85\u7ea7\u7528\u6237\u540d\uff0c\u6216\u8005\u66f4\u597d\u7684\u505a\u6cd5\u662f\u786e\u4fdd\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u751f\u6210\u7684\u811a\u672c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--exclude-database=<em class=\"replaceable\"><code>pattern</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f6c\u50a8\u540d\u79f0\u5339\u914d<em class=\"replaceable\"><code>pattern</code></em>\u7684\u6570\u636e\u5e93\u3002\u53ef\u4ee5\u591a\u6b21\u5199<code class=\"option\">--exclude-database</code>\u5f00\u5173\uff0c\u4ee5\u6392\u9664\u5339\u914d\u6240\u7ed9\u6a21\u5f0f\u4e2d\u4efb\u610f\u4e00\u4e2a\u7684\u6570\u636e\u5e93\u3002<em class=\"replaceable\"><code>pattern</code></em>\u53c2\u6570\u6309\u7167<span class=\"application\">psql</span>\u7684<code class=\"literal\">\\d</code>\u547d\u4ee4\u6240\u4f7f\u7528\u7684\u540c\u6837\u89c4\u5219\u89e3\u91ca\uff08\u89c1<a class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\uff09\uff0c\u56e0\u6b64\u4e5f\u53ef\u4ee5\u901a\u8fc7\u5728\u6a21\u5f0f\u4e2d\u4f7f\u7528\u901a\u914d\u7b26\u6765\u6392\u9664\u591a\u4e2a\u6570\u636e\u5e93\u3002\u4f7f\u7528\u901a\u914d\u7b26\u65f6\uff0c\u5982\u6709\u9700\u8981\u8bf7\u52a1\u5fc5\u4e3a\u6a21\u5f0f\u52a0\u5f15\u53f7\uff0c\u4ee5\u9632\u6b62 shell \u5c55\u5f00\u901a\u914d\u7b26\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--extra-float-digits=<em class=\"replaceable\"><code>ndigits</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u6d6e\u70b9\u6570\u636e\u65f6\uff0c\u4f7f\u7528\u6307\u5b9a\u7684 extra_float_digits \u503c\uff0c\u800c\u4e0d\u662f\u6700\u5927\u53ef\u7528\u7cbe\u5ea6\u3002\u51fa\u4e8e\u5907\u4efd\u76ee\u7684\u7684\u5e38\u89c4\u8f6c\u50a8\u4e0d\u5e94\u4f7f\u7528\u6b64\u9009\u9879\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--filter=<em class=\"replaceable\"><code>filename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u4ece\u4e2d\u8bfb\u53d6\u8981\u4ece\u8f6c\u50a8\u4e2d\u6392\u9664\u7684\u6570\u636e\u5e93\u540d\u79f0\u7684\u5339\u914d\u6a21\u5f0f\u3002\u8fd9\u4e9b\u6a21\u5f0f\u6309\u7167\u4e0e<code class=\"option\">--exclude-database</code>\u76f8\u540c\u7684\u89c4\u5219\u89e3\u91ca\u3002\u8981\u4ece<code class=\"literal\">STDIN</code>\u8bfb\u53d6\uff0c\u8bf7\u4f7f\u7528<code class=\"filename\">-</code>\u4f5c\u4e3a\u6587\u4ef6\u540d\u3002<code class=\"option\">--filter</code>\u53ef\u4e0e<code class=\"option\">--exclude-database</code>\u7ed3\u5408\u4f7f\u7528\u4ee5\u6392\u9664\u6570\u636e\u5e93\uff0c\u4e5f\u53ef\u4ee5\u6307\u5b9a\u591a\u6b21\u4ee5\u8bfb\u53d6\u591a\u4e2a\u8fc7\u6ee4\u6587\u4ef6\u3002</p>\n<p lang=\"zh\">\u8be5\u6587\u4ef6\u6bcf\u884c\u5217\u51fa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u5339\u914d\u6a21\u5f0f\uff0c\u683c\u5f0f\u5982\u4e0b\uff1a</p>\n<pre class=\"synopsis\">exclude database <em class=\"replaceable\"><code>PATTERN</code></em>\n</pre>\n<p lang=\"zh\">\u4ee5 <code class=\"literal\">#</code> \u5f00\u5934\u7684\u884c\u88ab\u89c6\u4e3a\u6ce8\u91ca\u5e76\u5ffd\u7565\u3002\u6ce8\u91ca\u4e5f\u53ef\u4ee5\u653e\u5728\u5bf9\u8c61\u5339\u914d\u6a21\u5f0f\u884c\u4e4b\u540e\u3002\u7a7a\u767d\u884c\u540c\u6837\u4f1a\u88ab\u5ffd\u7565\u3002\u6709\u5173\u5982\u4f55\u5728\u5339\u914d\u6a21\u5f0f\u4e2d\u52a0\u5f15\u53f7\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/app-psql.html#APP-PSQL-PATTERNS\" title=\"\u6a21\u5f0f\">\u6a21\u5f0f</a>\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--if-exists</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4f7f\u7528 <code class=\"literal\">DROP ... IF EXISTS</code> \u547d\u4ee4\u5728 <code class=\"option\">--clean</code> \u6a21\u5f0f\u4e0b\u5220\u9664\u5bf9\u8c61\u3002\u8fd9\u4f1a\u6291\u5236\u539f\u672c\u53ef\u80fd\u62a5\u544a\u7684<span class=\"quote\">\u201c<span class=\"quote\">does not exist</span>\u201d</span>\u9519\u8bef\u4fe1\u606f\u3002\u9664\u975e\u540c\u65f6\u6307\u5b9a\u4e86 <code class=\"option\">--clean</code>\uff0c\u5426\u5219\u6b64\u9009\u9879\u65e0\u6548\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--inserts</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u8fd9\u4f1a\u4f7f\u6062\u590d\u975e\u5e38\u7f13\u6162\uff1b\u5b83\u4e3b\u8981\u7528\u4e8e\u751f\u6210\u53ef\u4ee5\u88c5\u5165\u975e <span class=\"productname\">PostgreSQL</span> \u6570\u636e\u5e93\u7684\u8f6c\u50a8\u3002\u6ce8\u610f\uff0c\u5982\u679c\u91cd\u65b0\u5b89\u6392\u4e86\u5217\u987a\u5e8f\uff0c\u6062\u590d\u53ef\u80fd\u4f1a\u5f7b\u5e95\u5931\u8d25\u3002<code class=\"option\">--column-inserts</code>\u9009\u9879\u53ef\u4ee5\u907f\u514d\u5217\u987a\u5e8f\u53d8\u5316\u5e26\u6765\u7684\u95ee\u9898\uff0c\u4f46\u901f\u5ea6\u66f4\u6162\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--load-via-partition-root</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f53\u4e3a\u8868\u5206\u533a\u8f6c\u50a8\u6570\u636e\u65f6\uff0c\u8ba9<code class=\"command\">COPY</code>\u6216<code class=\"command\">INSERT</code>\u8bed\u53e5\u4ee5\u5305\u542b\u8be5\u5206\u533a\u7684\u5206\u533a\u5c42\u6b21\u7ed3\u6784\u6839\u4e3a\u76ee\u6807\uff0c\u800c\u4e0d\u662f\u4ee5\u8be5\u5206\u533a\u672c\u8eab\u4e3a\u76ee\u6807\u3002\u8fd9\u4f1a\u5bfc\u81f4\u5728\u52a0\u8f7d\u6570\u636e\u65f6\u4e3a\u6bcf\u4e00\u884c\u91cd\u65b0\u786e\u5b9a\u9002\u5f53\u7684\u5206\u533a\u3002\u5f53\u5728\u53e6\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u6062\u590d\u6570\u636e\uff0c\u800c\u884c\u5e76\u4e0d\u603b\u662f\u843d\u5728\u4e0e\u539f\u59cb\u670d\u52a1\u5668\u76f8\u540c\u7684\u5206\u533a\u4e2d\u65f6\uff0c\u8fd9\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5206\u533a\u5217\u662f text \u7c7b\u578b\uff0c\u800c\u4e24\u4e2a\u7cfb\u7edf\u5bf9\u7528\u4e8e\u6392\u5e8f\u8be5\u5206\u533a\u5217\u7684\u6392\u5e8f\u89c4\u5219\u5b9a\u4e49\u4e0d\u540c\uff0c\u5c31\u53ef\u80fd\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--lock-wait-timeout=<em class=\"replaceable\"><code>timeout</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u5f00\u59cb\u65f6\uff0c\u4e0d\u8981\u65e0\u9650\u7b49\u5f85\u83b7\u53d6\u5171\u4eab\u8868\u9501\u3002\u5982\u679c\u65e0\u6cd5\u5728\u6307\u5b9a\u7684<em class=\"replaceable\"><code>timeout</code></em>\u5185\u9501\u5b9a\u67d0\u4e2a\u8868\uff0c\u5c31\u8ba9\u8f6c\u50a8\u5931\u8d25\u3002\u8d85\u65f6\u53ef\u4ee5\u7528<code class=\"command\">SET statement_timeout</code>\u63a5\u53d7\u7684\u4efb\u610f\u683c\u5f0f\u6307\u5b9a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-comments</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8<code class=\"command\">COMMENT</code>\u547d\u4ee4\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-policies</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u884c\u5b89\u5168\u6027\u7b56\u7565\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-publications</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u53d1\u5e03\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-role-passwords</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u89d2\u8272\u5bc6\u7801\u3002\u6062\u590d\u540e\uff0c\u89d2\u8272\u7684\u5bc6\u7801\u503c\u5c06\u4e3a null\uff0c\u5728\u8bbe\u7f6e\u5bc6\u7801\u4e4b\u524d\uff0c\u5bc6\u7801\u8ba4\u8bc1\u59cb\u7ec8\u4f1a\u5931\u8d25\u3002\u7531\u4e8e\u6307\u5b9a\u6b64\u9009\u9879\u65f6\u4e0d\u9700\u8981\u5bc6\u7801\u503c\uff0c\u89d2\u8272\u4fe1\u606f\u5c06\u4ece\u76ee\u5f55\u89c6\u56fe<code class=\"structname\">pg_roles</code>\u800c\u4e0d\u662f<code class=\"structname\">pg_authid</code>\u8bfb\u53d6\u3002\u56e0\u6b64\uff0c\u5982\u679c\u67d0\u4e9b\u5b89\u5168\u7b56\u7565\u9650\u5236\u4e86\u5bf9<code class=\"structname\">pg_authid</code>\u7684\u8bbf\u95ee\uff0c\u6b64\u9009\u9879\u4e5f\u4f1a\u6709\u5e2e\u52a9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-schema</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-security-labels</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u5b89\u5168\u6807\u7b7e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-subscriptions</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u8ba2\u9605\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-sync</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u7b49\u5f85\u6240\u6709\u6587\u4ef6\u90fd\u88ab\u5b89\u5168\u5199\u5165\u78c1\u76d8\u3002\u8be5\u9009\u9879\u4f1a\u4f7f<code class=\"command\">pg_dumpall</code>\u7acb\u5373\u8fd4\u56de\u800c\u4e0d\u7b49\u5f85\uff0c\u8fd9\u6837\u66f4\u5feb\uff0c\u4f46\u610f\u5473\u7740\u968f\u540e\u5982\u679c\u64cd\u4f5c\u7cfb\u7edf\u5d29\u6e83\uff0c\u8f6c\u50a8\u53ef\u80fd\u4f1a\u635f\u574f\u3002\u901a\u5e38\uff0c\u6b64\u9009\u9879\u9002\u7528\u4e8e\u6d4b\u8bd5\uff0c\u4f46\u4e0d\u5e94\u5728\u4ece\u751f\u4ea7\u5b89\u88c5\u8f6c\u50a8\u6570\u636e\u65f6\u4f7f\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-table-access-method</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u9009\u62e9\u8868\u8bbf\u95ee\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u4f7f\u7528\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u8bbf\u95ee\u65b9\u6cd5\u521b\u5efa\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-tablespaces</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u521b\u5efa\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\uff0c\u4e5f\u4e0d\u8f93\u51fa\u7528\u4e8e\u4e3a\u5bf9\u8c61\u9009\u62e9\u8868\u7a7a\u95f4\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5bf9\u8c61\u5728\u6062\u590d\u65f6\u90fd\u4f1a\u521b\u5efa\u5728\u5f53\u65f6\u9ed8\u8ba4\u7684\u8868\u7a7a\u95f4\u4e2d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-toast-compression</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8f93\u51fa\u7528\u4e8e\u8bbe\u7f6e<acronym class=\"acronym\">TOAST</acronym>\u538b\u7f29\u65b9\u6cd5\u7684\u547d\u4ee4\u3002\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u6240\u6709\u5217\u90fd\u4f1a\u4ee5\u9ed8\u8ba4\u538b\u7f29\u8bbe\u7f6e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--no-unlogged-table-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u4e0d\u8981\u8f6c\u50a8\u4e0d\u8bb0\u5f55 WAL \u7684\u8868\u7684\u5185\u5bb9\u3002\u6b64\u9009\u9879\u4e0d\u5f71\u54cd\u662f\u5426\u8f6c\u50a8\u8868\u5b9a\u4e49\uff08\u6a21\u5f0f\uff09\uff1b\u5b83\u53ea\u4f1a\u6291\u5236\u8f6c\u50a8\u8868\u6570\u636e\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--on-conflict-do-nothing</code></span></dt>\n<dd>\n<p lang=\"zh\">\u4e3a INSERT \u547d\u4ee4\u6dfb\u52a0 ON CONFLICT DO NOTHING\u3002\u6b64\u9009\u9879\u5fc5\u987b\u4e0e --inserts \u6216 --column-inserts \u4e00\u8d77\u6307\u5b9a\u624d\u6709\u6548\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--quote-all-identifiers</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5f3a\u5236\u4e3a\u6240\u6709\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5f53\u4ece\u5176<span class=\"productname\">PostgreSQL</span>\u4e3b\u7248\u672c\u4e0e<span class=\"application\">pg_dumpall</span>\u4e0d\u540c\u7684\u670d\u52a1\u5668\u8f6c\u50a8\u6570\u636e\u5e93\u65f6\uff0c\u6216\u8005\u5f53\u8f93\u51fa\u6253\u7b97\u88c5\u5165\u53e6\u4e00\u4e3b\u7248\u672c\u670d\u52a1\u5668\u4e2d\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u6b64\u9009\u9879\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c<span class=\"application\">pg_dumpall</span>\u53ea\u4f1a\u7ed9\u5728\u5176\u81ea\u8eab\u4e3b\u7248\u672c\u4e2d\u5c5e\u4e8e\u4fdd\u7559\u5b57\u7684\u6807\u8bc6\u7b26\u52a0\u5f15\u53f7\u3002\u5904\u7406\u5176\u4ed6\u7248\u672c\u670d\u52a1\u5668\u65f6\uff0c\u8fd9\u6709\u65f6\u4f1a\u5e26\u6765\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u56e0\u4e3a\u5b83\u4eec\u7684\u4fdd\u7559\u5b57\u96c6\u5408\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528<code class=\"option\">--quote-all-identifiers</code>\u53ef\u4ee5\u907f\u514d\u8fd9\u7c7b\u95ee\u9898\uff0c\u4f46\u4ee3\u4ef7\u662f\u8f6c\u50a8\u811a\u672c\u66f4\u96be\u9605\u8bfb\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--restrict-key=<em class=\"replaceable\"><code>restrict_key</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u5728\u8f6c\u50a8\u8f93\u51fa\u4e2d\uff0c\u628a\u7ed9\u5b9a\u5b57\u7b26\u4e32\u7528\u4f5c<span class=\"application\">psql</span>\u7684<code class=\"command\">\\restrict</code>\u952e\u3002\u82e5\u672a\u6307\u5b9a\u9650\u5236\u952e\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6309\u9700\u8981\u968f\u673a\u751f\u6210\u4e00\u4e2a\u3002\u952e\u53ea\u80fd\u5305\u542b\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4e3b\u8981\u7528\u4e8e\u6d4b\u8bd5\u4ee5\u53ca\u5176\u4ed6\u9700\u8981\u53ef\u91cd\u590d\u8f93\u51fa\u7684\u573a\u666f\uff08\u4f8b\u5982\u6bd4\u8f83\u8f6c\u50a8\u6587\u4ef6\uff09\u3002\u4e00\u822c\u4e0d\u5efa\u8bae\u4f7f\u7528\u5b83\uff0c\u56e0\u4e3a\u82e5\u6076\u610f\u670d\u52a1\u5668\u4e8b\u5148\u77e5\u9053\u8be5\u952e\uff0c\u53ef\u80fd\u80fd\u591f\u6ce8\u5165\u4efb\u610f\u4ee3\u7801\uff0c\u5e76\u5728\u8fd0\u884c <span class=\"application\">psql</span> \u5904\u7406\u8f6c\u50a8\u8f93\u51fa\u7684\u673a\u5668\u4e0a\u6267\u884c\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--rows-per-insert=<em class=\"replaceable\"><code>nrows</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5c06\u6570\u636e\u8f6c\u50a8\u4e3a<code class=\"command\">INSERT</code>\u547d\u4ee4\uff08\u800c\u4e0d\u662f<code class=\"command\">COPY</code>\uff09\u3002\u5b83\u63a7\u5236\u6bcf\u4e2a<code class=\"command\">INSERT</code>\u547d\u4ee4\u7684\u6700\u5927\u884c\u6570\u3002\u6307\u5b9a\u7684\u503c\u5fc5\u987b\u662f\u5927\u4e8e\u96f6\u7684\u6570\u5b57\u3002\u6062\u590d\u8fc7\u7a0b\u4e2d\u7684\u4efb\u4f55\u9519\u8bef\u5c06\u5bfc\u81f4\u53ea\u6709\u5c5e\u4e8e\u6709\u95ee\u9898\u7684<code class=\"command\">INSERT</code>\u7684\u884c\u4e22\u5931\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u8868\u7684\u5185\u5bb9\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f6c\u50a8\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--statistics-only</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u53ea\u8f6c\u50a8\u7edf\u8ba1\u4fe1\u606f\uff0c\u4e0d\u8f6c\u50a8\u6a21\u5f0f\uff08\u6570\u636e\u5b9a\u4e49\uff09\u6216\u6570\u636e\u3002\u4f1a\u8f6c\u50a8\u8868\u3001\u7269\u5316\u89c6\u56fe\u3001\u5916\u90e8\u8868\u548c\u7d22\u5f15\u7684\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--sequence-data</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u5728\u8f6c\u50a8\u4e2d\u5305\u542b\u5e8f\u5217\u6570\u636e\u3002\u9664\u975e\u6307\u5b9a\u4e86 <code class=\"option\">--no-data</code>\u3001<code class=\"option\">--schema-only</code> \u6216 <code class=\"option\">--statistics-only</code>\uff0c\u5426\u5219\u8fd9\u662f\u9ed8\u8ba4\u884c\u4e3a\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--use-set-session-authorization</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u8f93\u51fa\u7b26\u5408 SQL \u6807\u51c6\u7684<code class=\"command\">SET SESSION AUTHORIZATION</code>\u547d\u4ee4\uff0c\u800c\u4e0d\u662f\u7528<code class=\"command\">ALTER OWNER</code>\u547d\u4ee4\u6765\u786e\u5b9a\u5bf9\u8c61\u6240\u6709\u6743\u3002\u8fd9\u4f1a\u8ba9\u8f6c\u50a8\u66f4\u7b26\u5408\u6807\u51c6\uff0c\u4f46\u6839\u636e\u8f6c\u50a8\u4e2d\u5bf9\u8c61\u7684\u5386\u53f2\uff0c\u53ef\u80fd\u65e0\u6cd5\u6b63\u786e\u6062\u590d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-?</code><br/></span><span class=\"term\"><code class=\"option\">--help</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u663e\u793a\u5173\u4e8e<span class=\"application\">pg_dumpall</span>\u547d\u4ee4\u884c\u53c2\u6570\u7684\u5e2e\u52a9\u4fe1\u606f\uff0c\u5e76\u9000\u51fa\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4ee5\u4e0b\u547d\u4ee4\u884c\u9009\u9879\u63a7\u5236\u6570\u636e\u5e93\u8fde\u63a5\u53c2\u6570\u3002</p>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"option\">-d <em class=\"replaceable\"><code>connstr</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--dbname=<em class=\"replaceable\"><code>connstr</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\u4ee5<a class=\"link\" href=\"/docs/18/libpq-connect.html#LIBPQ-CONNSTRING\" title=\"32.1.1.\u00a0\u8fde\u63a5\u5b57\u7b26\u4e32\">\u8fde\u63a5\u5b57\u7b26\u4e32</a>\u5f62\u5f0f\u6307\u5b9a\u7528\u4e8e\u8fde\u63a5\u670d\u52a1\u5668\u7684\u53c2\u6570\uff1b\u8fd9\u4e9b\u53c2\u6570\u5c06\u8986\u76d6\u4efb\u4f55\u51b2\u7a81\u7684\u547d\u4ee4\u884c\u9009\u9879\u3002</p>\n<p lang=\"zh\">\u8be5\u9009\u9879\u540d\u4e3a<code class=\"literal\">--dbname</code>\uff0c\u662f\u4e3a\u4e86\u4e0e\u5176\u4ed6\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u4fdd\u6301\u4e00\u81f4\uff1b\u4f46\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u9700\u8981\u8fde\u63a5\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u8fde\u63a5\u5b57\u7b26\u4e32\u4e2d\u7684\u6570\u636e\u5e93\u540d\u5c06\u88ab\u5ffd\u7565\u3002\u8bf7\u4f7f\u7528<code class=\"literal\">-l</code>\u9009\u9879\u6307\u5b9a\u521d\u59cb\u8fde\u63a5\u6240\u7528\u7684\u6570\u636e\u5e93\u540d\uff0c\u8be5\u8fde\u63a5\u5c06\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-h <em class=\"replaceable\"><code>host</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--host=<em class=\"replaceable\"><code>host</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8fd0\u884c\u6570\u636e\u5e93\u670d\u52a1\u5668\u7684\u673a\u5668\u7684\u4e3b\u673a\u540d\u3002\u5982\u679c\u8be5\u503c\u4ee5\u659c\u6760\u5f00\u5934\uff0c\u5219\u5c06\u5176\u7528\u4f5c Unix \u57df\u5957\u63a5\u5b57\u7684\u76ee\u5f55\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea<code class=\"envar\">PGHOST</code>\u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff1b\u5426\u5219\u4f1a\u5c1d\u8bd5\u4f7f\u7528 Unix \u57df\u5957\u63a5\u5b57\u8fde\u63a5\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-l <em class=\"replaceable\"><code>dbname</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--database=<em class=\"replaceable\"><code>dbname</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u7528\u4e8e\u8f6c\u50a8\u5168\u5c40\u5bf9\u8c61\u5e76\u53d1\u73b0\u8fd8\u5e94\u8f6c\u50a8\u54ea\u4e9b\u6570\u636e\u5e93\u7684\u8fde\u63a5\u6570\u636e\u5e93\u540d\u3002\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u4f7f\u7528<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u5982\u679c\u8be5\u6570\u636e\u5e93\u4e0d\u5b58\u5728\uff0c\u5219\u4f7f\u7528<code class=\"literal\">template1</code>\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-p <em class=\"replaceable\"><code>port</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--port=<em class=\"replaceable\"><code>port</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u670d\u52a1\u5668\u6b63\u5728\u76d1\u542c\u8fde\u63a5\u7684 TCP \u7aef\u53e3\uff0c\u6216\u672c\u5730 Unix \u57df\u5957\u63a5\u5b57\u6587\u4ef6\u6269\u5c55\u540d\u3002\u9ed8\u8ba4\u503c\u53d6\u81ea <code class=\"envar\">PGPORT</code> \u73af\u5883\u53d8\u91cf\uff08\u5982\u679c\u5df2\u8bbe\u7f6e\uff09\uff0c\u5426\u5219\u4f7f\u7528\u7f16\u8bd1\u65f6\u9ed8\u8ba4\u503c\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-U <em class=\"replaceable\"><code>username</code></em></code><br/></span><span class=\"term\"><code class=\"option\">--username=<em class=\"replaceable\"><code>username</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7528\u4e8e\u8fde\u63a5\u7684\u7528\u6237\u540d\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-w</code><br/></span><span class=\"term\"><code class=\"option\">--no-password</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u7edd\u4e0d\u53d1\u51fa\u5bc6\u7801\u63d0\u793a\u3002\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c\u800c\u53c8\u65e0\u6cd5\u901a\u8fc7 <code class=\"filename\">.pgpass</code> \u6587\u4ef6\u7b49\u5176\u4ed6\u65b9\u5f0f\u83b7\u5f97\u5bc6\u7801\uff0c\u5219\u8fde\u63a5\u5c1d\u8bd5\u5c06\u5931\u8d25\u3002\u5728\u6ca1\u6709\u7528\u6237\u5728\u573a\u8f93\u5165\u5bc6\u7801\u7684\u6279\u5904\u7406\u4f5c\u4e1a\u548c\u811a\u672c\u4e2d\uff0c\u6b64\u9009\u9879\u5f88\u6709\u7528\u3002</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">-W</code><br/></span><span class=\"term\"><code class=\"option\">--password</code></span></dt>\n<dd>\n<p lang=\"zh\">\u5f3a\u5236<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u4e4b\u524d\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002</p>\n<p lang=\"zh\">\u6b64\u9009\u9879\u4ece\u6765\u90fd\u4e0d\u662f\u5fc5\u9700\u7684\uff0c\u56e0\u4e3a\u5982\u679c\u670d\u52a1\u5668\u8981\u6c42\u5bc6\u7801\u8ba4\u8bc1\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u81ea\u52a8\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u4e0d\u8fc7\uff0c<span class=\"application\">pg_dumpall</span>\u4f1a\u6d6a\u8d39\u4e00\u6b21\u8fde\u63a5\u5c1d\u8bd5\u6765\u53d1\u73b0\u670d\u52a1\u5668\u9700\u8981\u5bc6\u7801\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u952e\u5165<code class=\"option\">-W</code>\u4ee5\u907f\u514d\u8fd9\u6b21\u989d\u5916\u7684\u8fde\u63a5\u5c1d\u8bd5\u662f\u503c\u5f97\u7684\u3002</p>\n<p lang=\"zh\">\u6ce8\u610f\uff0c\u5bf9\u6bcf\u4e2a\u8981\u8f6c\u50a8\u7684\u6570\u636e\u5e93\u90fd\u4f1a\u518d\u6b21\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u3002\u901a\u5e38\uff0c\u6700\u597d\u8bbe\u7f6e\u4e00\u4e2a<code class=\"filename\">~/.pgpass</code>\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u4f9d\u8d56\u624b\u5de5\u8f93\u5165\u5bc6\u7801\u3002</p>\n</dd>\n<dt><span class=\"term\"><code class=\"option\">--role=<em class=\"replaceable\"><code>rolename</code></em></code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u4e00\u4e2a\u89d2\u8272\u540d\uff0c\u7528\u4e8e\u521b\u5efa\u8f6c\u50a8\u3002\u6b64\u9009\u9879\u4f1a\u4f7f<span class=\"application\">pg_dumpall</span>\u5728\u8fde\u63a5\u6570\u636e\u5e93\u540e\u53d1\u51fa<code class=\"command\">SET ROLE</code> <em class=\"replaceable\"><code>rolename</code></em>\u547d\u4ee4\u3002\u5f53\u5df2\u8ba4\u8bc1\u7528\u6237\uff08\u7531<code class=\"option\">-U</code>\u6307\u5b9a\uff09\u7f3a\u5c11<span class=\"application\">pg_dumpall</span>\u6240\u9700\u6743\u9650\uff0c\u4f46\u53ef\u4ee5\u5207\u6362\u5230\u5177\u5907\u6240\u9700\u6743\u9650\u7684\u89d2\u8272\u65f6\uff0c\u8fd9\u5f88\u6709\u7528\u3002\u6709\u4e9b\u5b89\u88c5\u73af\u5883\u4e0d\u5141\u8bb8\u76f4\u63a5\u4ee5\u8d85\u7ea7\u7528\u6237\u8eab\u4efd\u767b\u5f55\uff0c\u800c\u4f7f\u7528\u6b64\u9009\u9879\u53ef\u4ee5\u5728\u4e0d\u8fdd\u53cd\u8be5\u7b56\u7565\u7684\u60c5\u51b5\u4e0b\u5b8c\u6210\u8f6c\u50a8\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.7\">\n<h2 lang=\"zh\">\u73af\u5883</h2>\n<div class=\"variablelist\">\n<dl class=\"variablelist\">\n<dt><span class=\"term\"><code class=\"envar\">PGHOST</code><br/></span><span class=\"term\"><code class=\"envar\">PGOPTIONS</code><br/></span><span class=\"term\"><code class=\"envar\">PGPORT</code><br/></span><span class=\"term\"><code class=\"envar\">PGUSER</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u9ed8\u8ba4\u8fde\u63a5\u53c2\u6570</p>\n</p>\n</dd>\n<dt><span class=\"term\"><code class=\"envar\">PG_COLOR</code></span></dt>\n<dd>\n<p lang=\"zh\">\n<p>\u6307\u5b9a\u8bca\u65ad\u6d88\u606f\u662f\u5426\u4f7f\u7528\u989c\u8272\u3002\u53ef\u9009\u503c\u4e3a <code class=\"literal\">always</code>\u3001<code class=\"literal\">auto</code>\u548c <code class=\"literal\">never</code>\u3002</p>\n</p>\n</dd>\n</dl>\n</div>\n<p lang=\"zh\">\u4e0e\u5927\u591a\u6570\u5176\u4ed6 <span class=\"productname\">PostgreSQL</span> \u5de5\u5177\u4e00\u6837\uff0c\u6b64\u5de5\u5177\u4e5f\u4f7f\u7528 <span class=\"application\">libpq</span> \u652f\u6301\u7684\u73af\u5883\u53d8\u91cf\uff08\u89c1<a class=\"xref\" href=\"/docs/18/libpq-envars.html\" title=\"32.15.\u00a0\u73af\u5883\u53d8\u91cf\">\u7b2c\u00a032.15\u00a0\u8282</a>\uff09\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.8\">\n<h2 lang=\"zh\">\u6ce8\u89e3</h2>\n<p lang=\"zh\">\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u5728\u5185\u90e8\u8c03\u7528<span class=\"application\">pg_dump</span>\uff0c\u56e0\u6b64\u67d0\u4e9b\u8bca\u65ad\u6d88\u606f\u4f1a\u63d0\u5230<span class=\"application\">pg_dump</span>\u3002</p>\n<p lang=\"zh\">\u5373\u4f7f\u76ee\u6807\u662f\u5c06\u8f6c\u50a8\u811a\u672c\u6062\u590d\u5230\u4e00\u4e2a\u5168\u65b0\u7684\u96c6\u7c07\u4e2d\uff0c<code class=\"option\">--clean</code>\u9009\u9879\u4e5f\u53ef\u80fd\u5f88\u6709\u7528\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u540e\uff0c\u811a\u672c\u53ef\u4ee5\u5220\u9664\u5e76\u91cd\u65b0\u521b\u5efa\u5185\u7f6e\u7684<code class=\"literal\">postgres</code>\u548c<code class=\"literal\">template1</code>\u6570\u636e\u5e93\uff0c\u4ece\u800c\u786e\u4fdd\u8fd9\u4e9b\u6570\u636e\u5e93\u4fdd\u7559\u4e0e\u6e90\u96c6\u7c07\u4e2d\u76f8\u540c\u7684\u5c5e\u6027\uff08\u4f8b\u5982\u533a\u57df\u8bbe\u7f6e\u548c\u7f16\u7801\uff09\u3002\u5982\u679c\u4e0d\u4f7f\u7528\u6b64\u9009\u9879\uff0c\u8fd9\u4e9b\u6570\u636e\u5e93\u5c06\u4fdd\u7559\u5176\u73b0\u6709\u7684\u6570\u636e\u5e93\u7ea7\u5c5e\u6027\uff0c\u4ee5\u53ca\u4efb\u4f55\u9884\u5148\u5b58\u5728\u7684\u5185\u5bb9\u3002</p>\n<p lang=\"zh\">\u5f53\u6307\u5b9a\u4e86<code class=\"option\">--statistics</code>\u65f6\uff0c<code class=\"command\">pg_dumpall</code>\u4f1a\u5728\u751f\u6210\u7684\u8f6c\u50a8\u6587\u4ef6\u4e2d\u5305\u542b\u5927\u591a\u6570\u4f18\u5316\u5668\u7edf\u8ba1\u4fe1\u606f\u3002\u8fd9\u5e76\u4e0d\u5305\u62ec\u6240\u6709\u7edf\u8ba1\u4fe1\u606f\uff0c\u4f8b\u5982\u901a\u8fc7<a class=\"xref\" href=\"/docs/18/sql-createstatistics.html\" title=\"CREATE STATISTICS\"><span class=\"refentrytitle\">CREATE STATISTICS</span></a>\u663e\u5f0f\u521b\u5efa\u7684\u7edf\u8ba1\u4fe1\u606f\u3001\u6269\u5c55\u6dfb\u52a0\u7684\u81ea\u5b9a\u4e49\u7edf\u8ba1\u4fe1\u606f\uff0c\u6216\u7d2f\u79ef\u7edf\u8ba1\u7cfb\u7edf\u6536\u96c6\u7684\u7edf\u8ba1\u4fe1\u606f\u3002\u56e0\u6b64\uff0c\u5728\u4ece\u8f6c\u50a8\u6587\u4ef6\u6062\u590d\u540e\uff0c\u5bf9\u6bcf\u4e2a\u6570\u636e\u5e93\u518d\u8fd0\u884c<code class=\"command\">ANALYZE</code>\u4ee5\u786e\u4fdd\u6700\u4f73\u6027\u80fd\uff0c\u4ecd\u7136\u53ef\u80fd\u6709\u76ca\u3002\u4e5f\u53ef\u4ee5\u8fd0\u884c<code class=\"command\">vacuumdb -a -z</code>\u6765\u5206\u6790\u6240\u6709\u6570\u636e\u5e93\u3002</p>\n<p lang=\"zh\">\u4e0d\u5e94\u6307\u671b\u8be5\u8f6c\u50a8\u811a\u672c\u5728\u6267\u884c\u65f6\u5b8c\u5168\u4e0d\u51fa\u73b0\u9519\u8bef\u3002\u7279\u522b\u662f\uff0c\u7531\u4e8e\u811a\u672c\u4f1a\u4e3a\u6e90\u96c6\u7c07\u4e2d\u5b58\u5728\u7684\u6bcf\u4e2a\u89d2\u8272\u53d1\u51fa<code class=\"command\">CREATE ROLE</code>\uff0c\u56e0\u6b64\u9664\u975e\u76ee\u6807\u96c6\u7c07\u4f7f\u7528\u4e0d\u540c\u7684\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u540d\u521d\u59cb\u5316\uff0c\u5426\u5219\u4e00\u5b9a\u4f1a\u9047\u5230\u9488\u5bf9\u5f15\u5bfc\u8d85\u7ea7\u7528\u6237\u7684<span class=\"quote\">\u201c<span class=\"quote\">role already exists</span>\u201d</span>\u9519\u8bef\u3002\u8fd9\u4e2a\u9519\u8bef\u662f\u65e0\u5bb3\u7684\uff0c\u5e94\u5f53\u5ffd\u7565\u3002\u4f7f\u7528<code class=\"option\">--clean</code>\u8fd8\u53ef\u80fd\u4ea7\u751f\u4e00\u4e9b\u5173\u4e8e\u4e0d\u5b58\u5728\u5bf9\u8c61\u7684\u989d\u5916\u65e0\u5bb3\u9519\u8bef\u6d88\u606f\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u6dfb\u52a0<code class=\"option\">--if-exists</code>\u6765\u5c3d\u91cf\u51cf\u5c11\u8fd9\u4e9b\u6d88\u606f\u3002</p>\n<p lang=\"zh\"><span class=\"application\">pg_dumpall</span>\u8981\u6c42\u5728\u6062\u590d\u4e4b\u524d\uff0c\u6240\u6709\u5fc5\u9700\u7684\u8868\u7a7a\u95f4\u76ee\u5f55\u90fd\u5df2\u7ecf\u5b58\u5728\uff1b\u5426\u5219\uff0c\u4f4d\u4e8e\u975e\u9ed8\u8ba4\u4f4d\u7f6e\u7684\u6570\u636e\u5e93\u5728\u521b\u5efa\u65f6\u5c06\u4f1a\u5931\u8d25\u3002</p>\n<p lang=\"zh\">\u901a\u5e38\u5efa\u8bae\u5728\u4ece<span class=\"application\">pg_dumpall</span>\u811a\u672c\u6062\u590d\u6570\u636e\u5e93\u65f6\u4f7f\u7528<code class=\"option\">-X</code>\uff08<code class=\"option\">--no-psqlrc</code>\uff09\u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6062\u590d\u8fc7\u7a0b\u5e72\u51c0\uff0c\u5e76\u907f\u514d\u4e0e\u975e\u9ed8\u8ba4<span class=\"application\">psql</span>\u914d\u7f6e\u53d1\u751f\u6f5c\u5728\u51b2\u7a81\u3002\u6b64\u5916\uff0c\u7531\u4e8e<span class=\"application\">pg_dumpall</span>\u811a\u672c\u53ef\u80fd\u5305\u542b<span class=\"application\">psql</span>\u5143\u547d\u4ee4\uff0c\u56e0\u6b64\u5b83\u53ef\u80fd\u4e0e<span class=\"application\">psql</span>\u4ee5\u5916\u7684\u5ba2\u6237\u7aef\u4e0d\u517c\u5bb9\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"APP-PG-DUMPALL-EX\">\n<h2 lang=\"zh\">\u793a\u4f8b</h2>\n<p lang=\"zh\">\u8981\u8f6c\u50a8\u6240\u6709\u6570\u636e\u5e93\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>pg_dumpall &gt; db.out</code></strong>\n</pre>\n<p lang=\"zh\">\u8981\u4ece\u6b64\u6587\u4ef6\u6062\u590d\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\uff1a</p>\n<pre class=\"screen\"><code class=\"prompt\">$</code> <strong class=\"userinput\"><code>psql -X -f db.out -d postgres</code></strong>\n</pre>\n<p lang=\"zh\">\u8fd9\u91cc\u8fde\u63a5\u5230\u54ea\u4e2a\u6570\u636e\u5e93\u5e76\u4e0d\u91cd\u8981\uff0c\u56e0\u4e3a<span class=\"application\">pg_dumpall</span>\u751f\u6210\u7684\u811a\u672c\u6587\u4ef6\u4f1a\u5305\u542b\u7528\u4e8e\u521b\u5efa\u5df2\u4fdd\u5b58\u6570\u636e\u5e93\u5e76\u4e0e\u4e4b\u8fde\u63a5\u7684\u76f8\u5e94\u547d\u4ee4\u3002\u4e00\u4e2a\u4f8b\u5916\u662f\uff0c\u5982\u679c\u6307\u5b9a\u4e86<code class=\"option\">--clean</code>\uff0c\u5219\u4e00\u5f00\u59cb\u5fc5\u987b\u8fde\u63a5\u5230<code class=\"literal\">postgres</code>\u6570\u636e\u5e93\uff1b\u811a\u672c\u4f1a\u7acb\u5373\u5c1d\u8bd5\u5220\u9664\u5176\u4ed6\u6570\u636e\u5e93\uff0c\u800c\u5bf9\u5f53\u524d\u6240\u8fde\u63a5\u7684\u6570\u636e\u5e93\u6267\u884c\u8be5\u64cd\u4f5c\u4f1a\u5931\u8d25\u3002</p>\n</div>\n<div class=\"refsect1\" id=\"id-1.9.4.15.10\">\n<h2 lang=\"zh\">\u53e6\u89c1</h2>\n<p lang=\"zh\">\u6709\u5173\u53ef\u80fd\u51fa\u73b0\u7684\u9519\u8bef\u60c5\u51b5\uff0c\u8bf7\u53c2\u89c1<a class=\"xref\" href=\"/docs/18/app-pgdump.html\" title=\"pg_dump\"><span class=\"refentrytitle\"><span class=\"application\">pg_dump</span></span></a>\u3002</p>\n</div>\n</div></div>", "manual_path": "app-pg-dumpall.html", "localization": {"status": "complete", "sources": [{"url": "/docs/18/app-pg-dumpall.html", "method": "same-major semantic node", "sha256": "9b286b5bbf3f8f0e2224d989bb0eee3288a6be38e56dcb3734a8b43a5f82469c", "language": "zh", "matched_nodes": ["#APP-PG-DUMPALL/div[2]/p[1]", "#APP-PG-DUMPALL/div[3]/h2[0]", "#APP-PG-DUMPALL/div[4]/div[5]/h3[0]", "#APP-PG-DUMPALL/div[4]/div[5]/p[1]", "#APP-PG-DUMPALL/div[4]/p[1]", "#APP-PG-DUMPALL/div[4]/p[2]", "#APP-PG-DUMPALL/div[4]/p[3]", "#APP-PG-DUMPALL/div[4]/p[4]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[13]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[17]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[19]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[21]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[23]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[25]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[27]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[29]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[31]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[33]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[35]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[37]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[39]/p[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[41]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[43]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[45]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[47]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[49]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[51]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[53]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[55]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[57]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[59]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[61]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[63]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[65]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[67]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[69]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[71]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[73]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[75]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[79]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[0]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[81]/p[1]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[83]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[85]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[87]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[89]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[91]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[93]", "#APP-PG-DUMPALL/div[5]/div[2]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[11]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[13]/p[2]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[15]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[0]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[1]/p[1]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[5]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[7]", "#APP-PG-DUMPALL/div[5]/div[4]/dl[0]/dd[9]", "#APP-PG-DUMPALL/div[5]/p[1]", "#APP-PG-DUMPALL/div[5]/p[3]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[1]", "#APP-PG-DUMPALL/div[6]/div[1]/dl[0]/dd[3]", "#APP-PG-DUMPALL/div[6]/h2[0]", "#APP-PG-DUMPALL/div[6]/p[2]", "#APP-PG-DUMPALL/div[7]/h2[0]", "#APP-PG-DUMPALL/div[7]/p[1]", "#APP-PG-DUMPALL/div[7]/p[2]", "#APP-PG-DUMPALL/div[7]/p[3]", "#APP-PG-DUMPALL/div[7]/p[4]", "#APP-PG-DUMPALL/div[7]/p[5]", "#APP-PG-DUMPALL/div[7]/p[6]", "#APP-PG-DUMPALL/div[8]/h2[0]", "#APP-PG-DUMPALL/div[8]/p[1]", "#APP-PG-DUMPALL/div[8]/p[3]", "#APP-PG-DUMPALL/div[8]/p[5]", "#APP-PG-DUMPALL/div[9]/h2[0]", "#APP-PG-DUMPALL/div[9]/p[1]"]}], "language": "zh", "original_text": {"/versions/18/description/0": "pg_dumpall \u2014 extract a PostgreSQL database cluster into a script file", "/versions/18/facts/0/label": "Documented executable", "/versions/18/facts/1/label": "Executable version", "/versions/18/facts/2/label": "Reference inventory", "/versions/18/facts/2/value": "Client applications", "/versions/18/facts/3/label": "Option definition groups", "/versions/18/tables/0/title": "Documented options", "/versions/18/tables/1/title": "Environment variables", "/versions/18/related/0/label": "libpq connection parameters", "/versions/18/tables/0/rows/0/summary": "Dump only the data, not the schema (data definitions) or statistics.", "/versions/18/tables/0/rows/1/summary": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.", "/versions/18/tables/0/rows/2/summary": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)", "/versions/18/tables/0/rows/3/summary": "Send output to the specified file. If this is omitted, the standard output is used.", "/versions/18/tables/0/rows/4/summary": "Dump only global objects (roles and tablespaces), no databases.", "/versions/18/tables/0/rows/5/summary": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O .", "/versions/18/tables/0/rows/6/summary": "Dump only roles, no databases or tablespaces.", "/versions/18/tables/0/rows/7/summary": "Dump only the object definitions (schema), not data.", "/versions/18/tables/0/rows/8/summary": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)", "/versions/18/tables/0/rows/9/summary": "Dump only tablespaces, no databases or roles.", "/versions/18/tables/0/columns/0/label": "Option and arguments", "/versions/18/tables/0/columns/1/label": "Description", "/versions/18/tables/0/rows/10/summary": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump .", "/versions/18/tables/0/rows/11/summary": "Print the pg_dumpall version and exit.", "/versions/18/tables/0/rows/12/summary": "Prevent dumping of access privileges (grant/revoke commands).", "/versions/18/tables/0/rows/13/summary": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice.", "/versions/18/tables/0/rows/14/summary": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases.", "/versions/18/tables/0/rows/15/summary": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax.", "/versions/18/tables/0/rows/16/summary": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore.", "/versions/18/tables/0/rows/17/summary": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion.", "/versions/18/tables/0/rows/18/summary": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option.", "/versions/18/tables/0/rows/19/summary": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files.", "/versions/18/tables/0/rows/20/summary": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.", "/versions/18/tables/0/rows/21/summary": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower.", "/versions/18/tables/0/rows/22/summary": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.", "/versions/18/tables/0/rows/23/summary": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout .", "/versions/18/tables/0/rows/24/summary": "Do not dump COMMENT commands.", "/versions/18/tables/0/rows/25/summary": "Do not dump data.", "/versions/18/tables/0/rows/26/summary": "Do not dump row security policies.", "/versions/18/tables/0/rows/27/summary": "Do not dump publications.", "/versions/18/tables/0/rows/28/summary": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy.", "/versions/18/tables/0/rows/29/summary": "Do not dump schema (data definitions).", "/versions/18/tables/0/rows/30/summary": "Do not dump security labels.", "/versions/18/tables/0/rows/31/summary": "Do not dump statistics. This is the default.", "/versions/18/tables/0/rows/32/summary": "Do not dump subscriptions.", "/versions/18/tables/0/rows/33/summary": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation.", "/versions/18/tables/0/rows/34/summary": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore.", "/versions/18/tables/0/rows/35/summary": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore.", "/versions/18/tables/0/rows/36/summary": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting.", "/versions/18/tables/0/rows/37/summary": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data.", "/versions/18/tables/0/rows/38/summary": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified.", "/versions/18/tables/0/rows/39/summary": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script.", "/versions/18/tables/0/rows/40/summary": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters.", "/versions/18/tables/0/rows/41/summary": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents.", "/versions/18/tables/0/rows/42/summary": "Dump optimizer statistics.", "/versions/18/tables/0/rows/43/summary": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped.", "/versions/18/tables/0/rows/44/summary": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified.", "/versions/18/tables/0/rows/45/summary": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly.", "/versions/18/tables/0/rows/46/summary": "Show help about pg_dumpall command line arguments, and exit.", "/versions/18/tables/0/rows/47/summary": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options.", "/versions/18/tables/0/rows/48/summary": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted.", "/versions/18/tables/0/rows/49/summary": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used.", "/versions/18/tables/0/rows/50/summary": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default.", "/versions/18/tables/0/rows/51/summary": "User name to connect as.", "/versions/18/tables/0/rows/52/summary": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password.", "/versions/18/tables/0/rows/53/summary": "Force pg_dumpall to prompt for a password before connecting to a database.", "/versions/18/tables/0/rows/54/summary": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy.", "/versions/18/tables/1/columns/0/label": "Variable", "/versions/18/tables/1/columns/1/label": "Meaning", "/versions/18/tables/1/rows/0/description": "Default connection parameters", "/versions/18/tables/1/rows/1/description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}, "fallback_fields": [], "source_language": "en", "original_snapshot_sha256": "57b1f95d97242efc5f80ae1c058c4f86535acf847f436872796771f25567f864"}, "comparison_data": {"options": [{"names": ["-a", "--data-only"], "signature": "-a --data-only", "description": "Dump only the data, not the schema (data definitions) or statistics."}, {"names": ["-c", "--clean"], "signature": "-c --clean", "description": "Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified."}, {"names": ["-E encoding", "--encoding= encoding"], "signature": "-E encoding --encoding= encoding", "description": "Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)"}, {"names": ["-f filename", "--file= filename"], "signature": "-f filename --file= filename", "description": "Send output to the specified file. If this is omitted, the standard output is used."}, {"names": ["-g", "--globals-only"], "signature": "-g --globals-only", "description": "Dump only global objects (roles and tablespaces), no databases."}, {"names": ["-O", "--no-owner"], "signature": "-O --no-owner", "description": "Do not output commands to set ownership of objects to match the original database. By default, pg_dumpall issues ALTER OWNER or SET SESSION AUTHORIZATION statements to set ownership of created schema elements. These statements will fail when the script is run unless it is started by a superuser (or the same user that owns all of the objects in the script). To make a script that can be restored by any user, but will give that user ownership of all the objects, specify -O ."}, {"names": ["-r", "--roles-only"], "signature": "-r --roles-only", "description": "Dump only roles, no databases or tablespaces."}, {"names": ["-s", "--schema-only"], "signature": "-s --schema-only", "description": "Dump only the object definitions (schema), not data."}, {"names": ["-S username", "--superuser= username"], "signature": "-S username --superuser= username", "description": "Specify the superuser user name to use when disabling triggers. This is relevant only if --disable-triggers is used. (Usually, it's better to leave this out, and instead start the resulting script as superuser.)"}, {"names": ["-t", "--tablespaces-only"], "signature": "-t --tablespaces-only", "description": "Dump only tablespaces, no databases or roles."}, {"names": ["-v", "--verbose"], "signature": "-v --verbose", "description": "Specifies verbose mode. This will cause pg_dumpall to output start/stop times to the dump file, and progress messages to standard error. Repeating the option causes additional debug-level messages to appear on standard error. The option is also passed down to pg_dump ."}, {"names": ["-V", "--version"], "signature": "-V --version", "description": "Print the pg_dumpall version and exit."}, {"names": ["-x", "--no-privileges", "--no-acl"], "signature": "-x --no-privileges --no-acl", "description": "Prevent dumping of access privileges (grant/revoke commands)."}, {"names": ["--binary-upgrade"], "signature": "--binary-upgrade", "description": "This option is for use by in-place upgrade utilities. Its use for other purposes is not recommended or supported. The behavior of the option may change in future releases without notice."}, {"names": ["--column-inserts", "--attribute-inserts"], "signature": "--column-inserts --attribute-inserts", "description": "Dump data as INSERT commands with explicit column names ( INSERT INTO table ( column , ...) VALUES ... ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases."}, {"names": ["--disable-dollar-quoting"], "signature": "--disable-dollar-quoting", "description": "This option disables the use of dollar quoting for function bodies, and forces them to be quoted using SQL standard string syntax."}, {"names": ["--disable-triggers"], "signature": "--disable-triggers", "description": "This option is relevant only when creating a dump with data and without schema. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser."}, {"names": ["--exclude-database= pattern"], "signature": "--exclude-database= pattern", "description": "Do not dump databases whose name matches pattern . Multiple patterns can be excluded by writing multiple --exclude-database switches. The pattern parameter is interpreted as a pattern according to the same rules used by psql 's \\d commands (see Patterns ), so multiple databases can also be excluded by writing wildcard characters in the pattern. When using wildcards, be careful to quote the pattern if needed to prevent shell wildcard expansion."}, {"names": ["--extra-float-digits= ndigits"], "signature": "--extra-float-digits= ndigits", "description": "Use the specified value of extra_float_digits when dumping floating-point data, instead of the maximum available precision. Routine dumps made for backup purposes should not use this option."}, {"names": ["--filter= filename"], "signature": "--filter= filename", "description": "Specify a filename from which to read patterns for databases excluded from the dump. The patterns are interpreted according to the same rules as --exclude-database . To read from STDIN , use - as the filename. The --filter option can be specified in conjunction with --exclude-database for excluding databases, and can also be specified more than once for multiple filter files. The file lists one database pattern per row, with the following format: exclude database PATTERN Lines starting with # are considered comments and ignored. Comments can be placed after an object pattern row as well. Blank lines are also ignored. See Patterns for how to perform quoting in patterns."}, {"names": ["--if-exists"], "signature": "--if-exists", "description": "Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified."}, {"names": ["--inserts"], "signature": "--inserts", "description": "Dump data as INSERT commands (rather than COPY ). This will make restoration very slow; it is mainly useful for making dumps that can be loaded into non- PostgreSQL databases. Note that the restore might fail altogether if you have rearranged column order. The --column-inserts option is safer, though even slower."}, {"names": ["--load-via-partition-root"], "signature": "--load-via-partition-root", "description": "When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column."}, {"names": ["--lock-wait-timeout= timeout"], "signature": "--lock-wait-timeout= timeout", "description": "Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout ."}, {"names": ["--no-comments"], "signature": "--no-comments", "description": "Do not dump COMMENT commands."}, {"names": ["--no-data"], "signature": "--no-data", "description": "Do not dump data."}, {"names": ["--no-policies"], "signature": "--no-policies", "description": "Do not dump row security policies."}, {"names": ["--no-publications"], "signature": "--no-publications", "description": "Do not dump publications."}, {"names": ["--no-role-passwords"], "signature": "--no-role-passwords", "description": "Do not dump passwords for roles. When restored, roles will have a null password, and password authentication will always fail until the password is set. Since password values aren't needed when this option is specified, the role information is read from the catalog view pg_roles instead of pg_authid . Therefore, this option also helps if access to pg_authid is restricted by some security policy."}, {"names": ["--no-schema"], "signature": "--no-schema", "description": "Do not dump schema (data definitions)."}, {"names": ["--no-security-labels"], "signature": "--no-security-labels", "description": "Do not dump security labels."}, {"names": ["--no-statistics"], "signature": "--no-statistics", "description": "Do not dump statistics. This is the default."}, {"names": ["--no-subscriptions"], "signature": "--no-subscriptions", "description": "Do not dump subscriptions."}, {"names": ["--no-sync"], "signature": "--no-sync", "description": "By default, pg_dumpall will wait for all files to be written safely to disk. This option causes pg_dumpall to return without waiting, which is faster, but means that a subsequent operating system crash can leave the dump corrupt. Generally, this option is useful for testing but should not be used when dumping data from production installation."}, {"names": ["--no-table-access-method"], "signature": "--no-table-access-method", "description": "Do not output commands to select table access methods. With this option, all objects will be created with whichever table access method is the default during restore."}, {"names": ["--no-tablespaces"], "signature": "--no-tablespaces", "description": "Do not output commands to create tablespaces nor select tablespaces for objects. With this option, all objects will be created in whichever tablespace is the default during restore."}, {"names": ["--no-toast-compression"], "signature": "--no-toast-compression", "description": "Do not output commands to set TOAST compression methods. With this option, all columns will be restored with the default compression setting."}, {"names": ["--no-unlogged-table-data"], "signature": "--no-unlogged-table-data", "description": "Do not dump the contents of unlogged tables. This option has no effect on whether or not the table definitions (schema) are dumped; it only suppresses dumping the table data."}, {"names": ["--on-conflict-do-nothing"], "signature": "--on-conflict-do-nothing", "description": "Add ON CONFLICT DO NOTHING to INSERT commands. This option is not valid unless --inserts or --column-inserts is also specified."}, {"names": ["--quote-all-identifiers"], "signature": "--quote-all-identifiers", "description": "Force quoting of all identifiers. This option is recommended when dumping a database from a server whose PostgreSQL major version is different from pg_dumpall 's, or when the output is intended to be loaded into a server of a different major version. By default, pg_dumpall quotes only identifiers that are reserved words in its own major version. This sometimes results in compatibility issues when dealing with servers of other versions that may have slightly different sets of reserved words. Using --quote-all-identifiers prevents such issues, at the price of a harder-to-read dump script."}, {"names": ["--restrict-key= restrict_key"], "signature": "--restrict-key= restrict_key", "description": "Use the provided string as the psql \\restrict key in the dump output. If no restrict key is specified, pg_dumpall will generate a random one as needed. Keys may contain only alphanumeric characters. This option is primarily intended for testing purposes and other scenarios that require repeatable output (e.g., comparing dump files). It is not recommended for general use, as a malicious server with advance knowledge of the key may be able to inject arbitrary code that will be executed on the machine that runs psql with the dump output."}, {"names": ["--rows-per-insert= nrows"], "signature": "--rows-per-insert= nrows", "description": "Dump data as INSERT commands (rather than COPY ). Controls the maximum number of rows per INSERT command. The value specified must be a number greater than zero. Any error during restoring will cause only rows that are part of the problematic INSERT to be lost, rather than the entire table contents."}, {"names": ["--statistics"], "signature": "--statistics", "description": "Dump optimizer statistics."}, {"names": ["--statistics-only"], "signature": "--statistics-only", "description": "Dump only the statistics, not the schema (data definitions) or data. Optimizer statistics for tables, materialized views, foreign tables, and indexes are dumped."}, {"names": ["--sequence-data"], "signature": "--sequence-data", "description": "Include sequence data in the dump. This is the default behavior except when --no-data , --schema-only , or --statistics-only is specified."}, {"names": ["--use-set-session-authorization"], "signature": "--use-set-session-authorization", "description": "Output SQL-standard SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to determine object ownership. This makes the dump more standards compatible, but depending on the history of the objects in the dump, might not restore properly."}, {"names": ["-?", "--help"], "signature": "-? --help", "description": "Show help about pg_dumpall command line arguments, and exit."}, {"names": ["-d connstr", "--dbname= connstr"], "signature": "-d connstr --dbname= connstr", "description": "Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped."}, {"names": ["-h host", "--host= host"], "signature": "-h host --host= host", "description": "Specifies the host name of the machine on which the database server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket. The default is taken from the PGHOST environment variable, if set, else a Unix domain socket connection is attempted."}, {"names": ["-l dbname", "--database= dbname"], "signature": "-l dbname --database= dbname", "description": "Specifies the name of the database to connect to for dumping global objects and discovering what other databases should be dumped. If not specified, the postgres database will be used, and if that does not exist, template1 will be used."}, {"names": ["-p port", "--port= port"], "signature": "-p port --port= port", "description": "Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. Defaults to the PGPORT environment variable, if set, or a compiled-in default."}, {"names": ["-U username", "--username= username"], "signature": "-U username --username= username", "description": "User name to connect as."}, {"names": ["-w", "--no-password"], "signature": "-w --no-password", "description": "Never issue a password prompt. If the server requires password authentication and a password is not available by other means such as a .pgpass file, the connection attempt will fail. This option can be useful in batch jobs and scripts where no user is present to enter a password."}, {"names": ["-W", "--password"], "signature": "-W --password", "description": "Force pg_dumpall to prompt for a password before connecting to a database. This option is never essential, since pg_dumpall will automatically prompt for a password if the server demands password authentication. However, pg_dumpall will waste a connection attempt finding out that the server wants a password. In some cases it is worth typing -W to avoid the extra connection attempt. Note that the password prompt will occur again for each database to be dumped. Usually, it's better to set up a ~/.pgpass file than to rely on manual password entry."}, {"names": ["--role= rolename"], "signature": "--role= rolename", "description": "Specifies a role name to be used to create the dump. This option causes pg_dumpall to issue a SET ROLE rolename command after connecting to the database. It is useful when the authenticated user (specified by -U ) lacks privileges needed by pg_dumpall , but can switch to a role with the required rights. Some installations have a policy against logging in directly as a superuser, and use of this option allows dumps to be made without violating the policy."}], "synopsis": ["pg_dumpall [ connection-option ...] [ option ...]"], "environment": [{"name": "PGHOST PGOPTIONS PGPORT PGUSER", "description": "Default connection parameters"}, {"name": "PG_COLOR", "description": "Specifies whether to use color in diagnostic messages. Possible values are always , auto and never ."}]}, "comparison_hash": "dd0edf9a9ef6de0e86b97b0a2b08127ecf99f382528014ef50f210767b2d4f6c", "manual_language": "zh"}, "comparison": {"left": "10", "right": "11", "status": "changed", "diff": "--- PostgreSQL 10\n+++ PostgreSQL 11\n@@ -15,12 +15,20 @@\n       \"signature\": \"-a --data-only\"\n     },\n     {\n-      \"description\": \"Include SQL commands to clean (drop) databases before recreating them. DROP commands for roles and tablespaces are added as well.\",\n+      \"description\": \"Emit SQL commands to DROP all the dumped databases, roles, and tablespaces before recreating them. This option is useful when the restore is to overwrite an existing cluster. If any of the objects do not exist in the destination cluster, ignorable error messages will be reported during restore, unless --if-exists is also specified.\",\n       \"names\": [\n         \"-c\",\n         \"--clean\"\n       ],\n       \"signature\": \"-c --clean\"\n+    },\n+    {\n+      \"description\": \"Create the dump in the specified character set encoding. By default, the dump is created in the database encoding. (Another way to get the same result is to set the PGCLIENTENCODING environment variable to the desired dump encoding.)\",\n+      \"names\": [\n+        \"-E encoding\",\n+        \"--encoding= encoding\"\n+      ],\n+      \"signature\": \"-E encoding --encoding= encoding\"\n     },\n     {\n       \"description\": \"Send output to the specified file. If this is omitted, the standard output is used.\",\n@@ -134,14 +142,14 @@\n       \"signature\": \"--disable-dollar-quoting\"\n     },\n     {\n-      \"description\": \"This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is reloaded. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data reload. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser.\",\n+      \"description\": \"This option is relevant only when creating a data-only dump. It instructs pg_dumpall to include commands to temporarily disable triggers on the target tables while the data is restored. Use this if you have referential integrity checks or other triggers on the tables that you do not want to invoke during data restore. Presently, the commands emitted for --disable-triggers must be done as superuser. So, you should also specify a superuser name with -S , or preferably be careful to start the resulting script as a superuser.\",\n       \"names\": [\n         \"--disable-triggers\"\n       ],\n       \"signature\": \"--disable-triggers\"\n     },\n     {\n-      \"description\": \"Use conditional commands (i.e., add an IF EXISTS clause) to clean databases and other objects. This option is not valid unless --clean is also specified.\",\n+      \"description\": \"Use DROP ... IF EXISTS commands to drop objects in --clean mode. This suppresses \u201c does not exist \u201d errors that might otherwise be reported. This option is not valid unless --clean is also specified.\",\n       \"names\": [\n         \"--if-exists\"\n       ],\n@@ -155,11 +163,25 @@\n       \"signature\": \"--inserts\"\n     },\n     {\n+      \"description\": \"When dumping data for a table partition, make the COPY or INSERT statements target the root of the partitioning hierarchy that contains it, rather than the partition itself. This causes the appropriate partition to be re-determined for each row when the data is loaded. This may be useful when restoring data on a server where rows do not always fall into the same partitions as they did on the original server. That could happen, for example, if the partitioning column is of type text and the two systems have different definitions of the collation used to sort the partitioning column.\",\n+      \"names\": [\n+        \"--load-via-partition-root\"\n+      ],\n+      \"signature\": \"--load-via-partition-root\"\n+    },\n+    {\n       \"description\": \"Do not wait forever to acquire shared table locks at the beginning of the dump. Instead, fail if unable to lock a table within the specified timeout . The timeout may be specified in any of the formats accepted by SET statement_timeout . Allowed values vary depending on the server version you are dumping from, but an integer number of milliseconds is accepted by all versions since 7.3. This option is ignored when dumping from a pre-7.3 server.\",\n       \"names\": [\n         \"--lock-wait-timeout= timeout\"\n       ],\n       \"signature\": \"--lock-wait-timeout= timeout\"\n+    },\n+    {\n+      \"description\": \"Do not dump comments.\",\n+      \"names\": [\n+        \"--no-comments\"\n+      ],\n+      \"signature\": \"--no-comments\"\n     },\n     {\n       \"description\": \"Do not dump publications.\",\n@@ -233,7 +255,7 @@\n       \"signature\": \"-? --help\"\n     },\n     {\n-      \"description\": \"Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, database name in the connection string will be ignored. Use -l option to specify the name of the database used to dump global objects and to discover what other databases should be dumped.\",\n+      \"description\": \"Specifies parameters used to connect to the server, as a connection string ; these will override any conflicting command line options. The option is called --dbname for consistency with other client applications, but because pg_dumpall needs to connect to many databases, the database name in the connection string will be ignored. Use the -l option to specify the name of the database used for the initial connection, which will dump global objects and discover what other databases should be dumped.\",\n       \"names\": [\n         \"-d connstr\",\n         \"--dbname= connstr\""}}