{
    "content": [
        {
            "type": "text",
            "text": "# vacuumdb (man)\n\n## NAME\n\nvacuumdb - garbage-collect and analyze a PostgreSQL database\n\n## SYNOPSIS\n\nvacuumdb [connection-option...] [option...] [ -t | --table table [( column [,...] )] ]...\n[dbname]\nvacuumdb [connection-option...] [option...] -a | --all\n\n## DESCRIPTION\n\nvacuumdb is a utility for cleaning a PostgreSQL database.  vacuumdb will also generate\ninternal statistics used by the PostgreSQL query optimizer.\n\n## TLDR\n\n> Garbage-collect and analyze a PostgreSQL database.\n\n- Vacuum a specific database:\n  `vacuumdb {{database_name}}`\n- Vacuum all databases:\n  `vacuumdb {{-a|--all}}`\n- Vacuum a specific table in a database:\n  `vacuumdb {{-t|--table}} {{table_name}} {{database_name}}`\n- Vacuum and update statistics for the query planner:\n  `vacuumdb {{-z|--analyze}} {{database_name}}`\n- Perform a full vacuum (more aggressive, locks tables, rewrites the whole table):\n  `vacuumdb {{-f|--full}} {{database_name}}`\n- Vacuum with verbose output:\n  `vacuumdb {{-v|--verbose}} {{database_name}}`\n- Vacuum a database using multiple parallel jobs:\n  `vacuumdb --jobs {{number_of_jobs}} {{database_name}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (36 subsections)\n- **ENVIRONMENT**\n- **DIAGNOSTICS**\n- **NOTES**\n- **EXAMPLES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "vacuumdb",
        "section": "",
        "mode": "man",
        "summary": "vacuumdb - garbage-collect and analyze a PostgreSQL database",
        "synopsis": "vacuumdb [connection-option...] [option...] [ -t | --table table [( column [,...] )] ]...\n[dbname]\nvacuumdb [connection-option...] [option...] -a | --all",
        "tldr_summary": "Garbage-collect and analyze a PostgreSQL database.",
        "tldr_examples": [
            {
                "description": "Vacuum a specific database",
                "command": "vacuumdb {{database_name}}"
            },
            {
                "description": "Vacuum all databases",
                "command": "vacuumdb {{-a|--all}}"
            },
            {
                "description": "Vacuum a specific table in a database",
                "command": "vacuumdb {{-t|--table}} {{table_name}} {{database_name}}"
            },
            {
                "description": "Vacuum and update statistics for the query planner",
                "command": "vacuumdb {{-z|--analyze}} {{database_name}}"
            },
            {
                "description": "Perform a full vacuum (more aggressive, locks tables, rewrites the whole table)",
                "command": "vacuumdb {{-f|--full}} {{database_name}}"
            },
            {
                "description": "Vacuum with verbose output",
                "command": "vacuumdb {{-v|--verbose}} {{database_name}}"
            },
            {
                "description": "Vacuum a database using multiple parallel jobs",
                "command": "vacuumdb --jobs {{number_of_jobs}} {{database_name}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--all",
                "arg": null,
                "description": "Vacuum all databases. [-d] dbname [--dbname=]dbname Specifies the name of the database to be cleaned or analyzed, when -a/--all is not used. If this is not specified, the database name is read from the environment variable PGDATABASE. If that is not set, the user name specified for the connection is used. The dbname can be a connection string. If so, connection string parameters will override any conflicting command line options."
            },
            {
                "flag": "",
                "long": "--disable-page-skipping",
                "arg": null,
                "description": "Disable skipping pages based on the contents of the visibility map. Note This option is only available for servers running PostgreSQL 9.6 and later."
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--echo",
                "arg": null,
                "description": "Echo the commands that vacuumdb generates and sends to the server."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--full",
                "arg": null,
                "description": "Perform “full” vacuuming."
            },
            {
                "flag": "-F",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--freeze",
                "arg": null,
                "description": "Aggressively “freeze” tuples."
            },
            {
                "flag": "",
                "long": "--force-index-cleanup",
                "arg": null,
                "description": "Always remove index entries pointing to dead tuples. Note This option is only available for servers running PostgreSQL 12 and later."
            },
            {
                "flag": "-j",
                "long": null,
                "arg": null,
                "description": "--jobs=njobs Execute the vacuum or analyze commands in parallel by running njobs commands simultaneously. This option may reduce the processing time but it also increases the load on the database server. vacuumdb will open njobs connections to the database, so make sure your maxconnections setting is high enough to accommodate all connections. Note that using this mode together with the -f (FULL) option might cause deadlock failures if certain system catalogs are processed in parallel. --min-mxid-age mxidage Only execute the vacuum or analyze commands on tables with a multixact ID age of at least mxidage. This setting is useful for prioritizing tables to process to prevent multixact ID wraparound (see Section 25.1.5.1). For the purposes of this option, the multixact ID age of a relation is the greatest of the ages of the main relation and its associated TOAST table, if one exists. Since the commands issued by vacuumdb will also process the TOAST table for the relation if necessary, it does not need to be considered separately. Note This option is only available for servers running PostgreSQL 9.6 and later. --min-xid-age xidage Only execute the vacuum or analyze commands on tables with a transaction ID age of at least xidage. This setting is useful for prioritizing tables to process to prevent transaction ID wraparound (see Section 25.1.5). For the purposes of this option, the transaction ID age of a relation is the greatest of the ages of the main relation and its associated TOAST table, if one exists. Since the commands issued by vacuumdb will also process the TOAST table for the relation if necessary, it does not need to be considered separately. Note This option is only available for servers running PostgreSQL 9.6 and later."
            },
            {
                "flag": "",
                "long": "--no-index-cleanup",
                "arg": null,
                "description": "Do not remove index entries pointing to dead tuples. Note This option is only available for servers running PostgreSQL 12 and later."
            },
            {
                "flag": "",
                "long": "--no-process-toast",
                "arg": null,
                "description": "Skip the TOAST table associated with the table to vacuum, if any. Note This option is only available for servers running PostgreSQL 14 and later."
            },
            {
                "flag": "",
                "long": "--no-truncate",
                "arg": null,
                "description": "Do not truncate empty pages at the end of the table. Note This option is only available for servers running PostgreSQL 12 and later."
            },
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "--parallel=parallelworkers Specify the number of parallel workers for parallel vacuum. This allows the vacuum to leverage multiple CPUs to process indexes. See VACUUM(7). Note This option is only available for servers running PostgreSQL 13 and later."
            },
            {
                "flag": "-q",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--quiet",
                "arg": null,
                "description": "Do not display progress messages."
            },
            {
                "flag": "",
                "long": "--skip-locked",
                "arg": null,
                "description": "Skip relations that cannot be immediately locked for processing. Note This option is only available for servers running PostgreSQL 12 and later."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "--table=table [ (column [,...]) ] Clean or analyze table only. Column names can be specified only in conjunction with the --analyze or --analyze-only options. Multiple tables can be vacuumed by writing multiple -t switches. Tip If you specify columns, you probably have to escape the parentheses from the shell. (See examples below.)"
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--verbose",
                "arg": null,
                "description": "Print detailed information during processing."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print the vacuumdb version and exit."
            },
            {
                "flag": "-z",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--analyze",
                "arg": null,
                "description": "Also calculate statistics for use by the optimizer."
            },
            {
                "flag": "-Z",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--analyze-only",
                "arg": null,
                "description": "Only calculate statistics for use by the optimizer (no vacuum)."
            },
            {
                "flag": "",
                "long": "--analyze-in-stages",
                "arg": null,
                "description": "Only calculate statistics for use by the optimizer (no vacuum), like --analyze-only. Run several (currently three) stages of analyze with different configuration settings, to produce usable statistics faster. This option is useful to analyze a database that was newly populated from a restored dump or by pgupgrade. This option will try to create some statistics as fast as possible, to make the database usable, and then produce full statistics in the subsequent stages. -?"
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "Show help about vacuumdb command line arguments, and exit. vacuumdb also accepts the following command-line arguments for connection parameters:"
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "--host=host Specifies the host name of the machine on which the server is running. If the value begins with a slash, it is used as the directory for the Unix domain socket."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "--port=port Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections."
            },
            {
                "flag": "-U",
                "long": null,
                "arg": null,
                "description": "--username=username User name to connect as."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--no-password",
                "arg": null,
                "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."
            },
            {
                "flag": "-W",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--password",
                "arg": null,
                "description": "Force vacuumdb to prompt for a password before connecting to a database. This option is never essential, since vacuumdb will automatically prompt for a password if the server demands password authentication. However, vacuumdb 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. --maintenance-db=dbname When the -a/--all is used, connect to this database to gather the list of databases to vacuum. If not specified, the postgres database will be used, or if that does not exist, template1 will be used. This can be a connection string. If so, connection string parameters will override any conflicting command line options. Also, connection string parameters other than the database name itself will be re-used when connecting to other databases."
            }
        ],
        "examples": [
            "To clean the database test:",
            "$ vacuumdb test",
            "To clean and analyze for the optimizer a database named bigdb:",
            "$ vacuumdb --analyze bigdb",
            "To clean a single table foo in a database named xyzzy, and analyze a single column bar of the",
            "table for the optimizer:",
            "$ vacuumdb --analyze --verbose --table='foo(bar)' xyzzy"
        ],
        "see_also": [
            {
                "name": "VACUUM",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/VACUUM/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "-a",
                        "lines": 1,
                        "flag": "-a"
                    },
                    {
                        "name": "--all",
                        "lines": 10,
                        "long": "--all"
                    },
                    {
                        "name": "--disable-page-skipping",
                        "lines": 5,
                        "long": "--disable-page-skipping"
                    },
                    {
                        "name": "-e",
                        "lines": 1,
                        "flag": "-e"
                    },
                    {
                        "name": "--echo",
                        "lines": 2,
                        "long": "--echo"
                    },
                    {
                        "name": "-f",
                        "lines": 1,
                        "flag": "-f"
                    },
                    {
                        "name": "--full",
                        "lines": 2,
                        "long": "--full"
                    },
                    {
                        "name": "-F",
                        "lines": 1,
                        "flag": "-F"
                    },
                    {
                        "name": "--freeze",
                        "lines": 2,
                        "long": "--freeze"
                    },
                    {
                        "name": "--force-index-cleanup",
                        "lines": 5,
                        "long": "--force-index-cleanup"
                    },
                    {
                        "name": "-j",
                        "lines": 37,
                        "flag": "-j"
                    },
                    {
                        "name": "--no-index-cleanup",
                        "lines": 5,
                        "long": "--no-index-cleanup"
                    },
                    {
                        "name": "--no-process-toast",
                        "lines": 5,
                        "long": "--no-process-toast"
                    },
                    {
                        "name": "--no-truncate",
                        "lines": 5,
                        "long": "--no-truncate"
                    },
                    {
                        "name": "-P",
                        "lines": 7,
                        "flag": "-P"
                    },
                    {
                        "name": "-q",
                        "lines": 1,
                        "flag": "-q"
                    },
                    {
                        "name": "--quiet",
                        "lines": 2,
                        "long": "--quiet"
                    },
                    {
                        "name": "--skip-locked",
                        "lines": 5,
                        "long": "--skip-locked"
                    },
                    {
                        "name": "-t",
                        "lines": 9,
                        "flag": "-t"
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "--verbose",
                        "lines": 2,
                        "long": "--verbose"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "-z",
                        "lines": 1,
                        "flag": "-z"
                    },
                    {
                        "name": "--analyze",
                        "lines": 2,
                        "long": "--analyze"
                    },
                    {
                        "name": "-Z",
                        "lines": 1,
                        "flag": "-Z"
                    },
                    {
                        "name": "--analyze-only",
                        "lines": 2,
                        "long": "--analyze-only"
                    },
                    {
                        "name": "--analyze-in-stages",
                        "lines": 9,
                        "long": "--analyze-in-stages"
                    },
                    {
                        "name": "--help",
                        "lines": 4,
                        "long": "--help"
                    },
                    {
                        "name": "-h",
                        "lines": 4,
                        "flag": "-h"
                    },
                    {
                        "name": "-p",
                        "lines": 4,
                        "flag": "-p"
                    },
                    {
                        "name": "-U",
                        "lines": 3,
                        "flag": "-U"
                    },
                    {
                        "name": "-w",
                        "lines": 1,
                        "flag": "-w"
                    },
                    {
                        "name": "--no-password",
                        "lines": 5,
                        "long": "--no-password"
                    },
                    {
                        "name": "-W",
                        "lines": 1,
                        "flag": "-W"
                    },
                    {
                        "name": "--password",
                        "lines": 15,
                        "long": "--password"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "vacuumdb - garbage-collect and analyze a PostgreSQL database\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "vacuumdb [connection-option...] [option...] [ -t | --table table [( column [,...] )] ]...\n[dbname]\n\nvacuumdb [connection-option...] [option...] -a | --all\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "vacuumdb is a utility for cleaning a PostgreSQL database.  vacuumdb will also generate\ninternal statistics used by the PostgreSQL query optimizer.\n\nvacuumdb is a wrapper around the SQL command VACUUM. There is no effective difference between\nvacuuming and analyzing databases via this utility and via other methods for accessing the\nserver.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "vacuumdb accepts the following command-line arguments:\n",
                "subsections": [
                    {
                        "name": "-a",
                        "content": "",
                        "flag": "-a"
                    },
                    {
                        "name": "--all",
                        "content": "Vacuum all databases.\n\n[-d] dbname\n[--dbname=]dbname\nSpecifies the name of the database to be cleaned or analyzed, when -a/--all is not used.\nIf this is not specified, the database name is read from the environment variable\nPGDATABASE. If that is not set, the user name specified for the connection is used. The\ndbname can be a connection string. If so, connection string parameters will override any\nconflicting command line options.\n",
                        "long": "--all"
                    },
                    {
                        "name": "--disable-page-skipping",
                        "content": "Disable skipping pages based on the contents of the visibility map.\n\nNote\nThis option is only available for servers running PostgreSQL 9.6 and later.\n",
                        "long": "--disable-page-skipping"
                    },
                    {
                        "name": "-e",
                        "content": "",
                        "flag": "-e"
                    },
                    {
                        "name": "--echo",
                        "content": "Echo the commands that vacuumdb generates and sends to the server.\n",
                        "long": "--echo"
                    },
                    {
                        "name": "-f",
                        "content": "",
                        "flag": "-f"
                    },
                    {
                        "name": "--full",
                        "content": "Perform “full” vacuuming.\n",
                        "long": "--full"
                    },
                    {
                        "name": "-F",
                        "content": "",
                        "flag": "-F"
                    },
                    {
                        "name": "--freeze",
                        "content": "Aggressively “freeze” tuples.\n",
                        "long": "--freeze"
                    },
                    {
                        "name": "--force-index-cleanup",
                        "content": "Always remove index entries pointing to dead tuples.\n\nNote\nThis option is only available for servers running PostgreSQL 12 and later.\n",
                        "long": "--force-index-cleanup"
                    },
                    {
                        "name": "-j",
                        "content": "--jobs=njobs\nExecute the vacuum or analyze commands in parallel by running njobs commands\nsimultaneously. This option may reduce the processing time but it also increases the load\non the database server.\n\nvacuumdb will open njobs connections to the database, so make sure your maxconnections\nsetting is high enough to accommodate all connections.\n\nNote that using this mode together with the -f (FULL) option might cause deadlock\nfailures if certain system catalogs are processed in parallel.\n\n--min-mxid-age mxidage\nOnly execute the vacuum or analyze commands on tables with a multixact ID age of at least\nmxidage. This setting is useful for prioritizing tables to process to prevent multixact\nID wraparound (see Section 25.1.5.1).\n\nFor the purposes of this option, the multixact ID age of a relation is the greatest of\nthe ages of the main relation and its associated TOAST table, if one exists. Since the\ncommands issued by vacuumdb will also process the TOAST table for the relation if\nnecessary, it does not need to be considered separately.\n\nNote\nThis option is only available for servers running PostgreSQL 9.6 and later.\n\n--min-xid-age xidage\nOnly execute the vacuum or analyze commands on tables with a transaction ID age of at\nleast xidage. This setting is useful for prioritizing tables to process to prevent\ntransaction ID wraparound (see Section 25.1.5).\n\nFor the purposes of this option, the transaction ID age of a relation is the greatest of\nthe ages of the main relation and its associated TOAST table, if one exists. Since the\ncommands issued by vacuumdb will also process the TOAST table for the relation if\nnecessary, it does not need to be considered separately.\n\nNote\nThis option is only available for servers running PostgreSQL 9.6 and later.\n",
                        "flag": "-j"
                    },
                    {
                        "name": "--no-index-cleanup",
                        "content": "Do not remove index entries pointing to dead tuples.\n\nNote\nThis option is only available for servers running PostgreSQL 12 and later.\n",
                        "long": "--no-index-cleanup"
                    },
                    {
                        "name": "--no-process-toast",
                        "content": "Skip the TOAST table associated with the table to vacuum, if any.\n\nNote\nThis option is only available for servers running PostgreSQL 14 and later.\n",
                        "long": "--no-process-toast"
                    },
                    {
                        "name": "--no-truncate",
                        "content": "Do not truncate empty pages at the end of the table.\n\nNote\nThis option is only available for servers running PostgreSQL 12 and later.\n",
                        "long": "--no-truncate"
                    },
                    {
                        "name": "-P",
                        "content": "--parallel=parallelworkers\nSpecify the number of parallel workers for parallel vacuum. This allows the vacuum to\nleverage multiple CPUs to process indexes. See VACUUM(7).\n\nNote\nThis option is only available for servers running PostgreSQL 13 and later.\n",
                        "flag": "-P"
                    },
                    {
                        "name": "-q",
                        "content": "",
                        "flag": "-q"
                    },
                    {
                        "name": "--quiet",
                        "content": "Do not display progress messages.\n",
                        "long": "--quiet"
                    },
                    {
                        "name": "--skip-locked",
                        "content": "Skip relations that cannot be immediately locked for processing.\n\nNote\nThis option is only available for servers running PostgreSQL 12 and later.\n",
                        "long": "--skip-locked"
                    },
                    {
                        "name": "-t",
                        "content": "--table=table [ (column [,...]) ]\nClean or analyze table only. Column names can be specified only in conjunction with the\n--analyze or --analyze-only options. Multiple tables can be vacuumed by writing multiple\n-t switches.\n\nTip\nIf you specify columns, you probably have to escape the parentheses from the shell.\n(See examples below.)\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-v",
                        "content": "",
                        "flag": "-v"
                    },
                    {
                        "name": "--verbose",
                        "content": "Print detailed information during processing.\n",
                        "long": "--verbose"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    },
                    {
                        "name": "--version",
                        "content": "Print the vacuumdb version and exit.\n",
                        "long": "--version"
                    },
                    {
                        "name": "-z",
                        "content": "",
                        "flag": "-z"
                    },
                    {
                        "name": "--analyze",
                        "content": "Also calculate statistics for use by the optimizer.\n",
                        "long": "--analyze"
                    },
                    {
                        "name": "-Z",
                        "content": "",
                        "flag": "-Z"
                    },
                    {
                        "name": "--analyze-only",
                        "content": "Only calculate statistics for use by the optimizer (no vacuum).\n",
                        "long": "--analyze-only"
                    },
                    {
                        "name": "--analyze-in-stages",
                        "content": "Only calculate statistics for use by the optimizer (no vacuum), like --analyze-only. Run\nseveral (currently three) stages of analyze with different configuration settings, to\nproduce usable statistics faster.\n\nThis option is useful to analyze a database that was newly populated from a restored dump\nor by pgupgrade. This option will try to create some statistics as fast as possible, to\nmake the database usable, and then produce full statistics in the subsequent stages.\n\n-?",
                        "long": "--analyze-in-stages"
                    },
                    {
                        "name": "--help",
                        "content": "Show help about vacuumdb command line arguments, and exit.\n\nvacuumdb also accepts the following command-line arguments for connection parameters:\n",
                        "long": "--help"
                    },
                    {
                        "name": "-h",
                        "content": "--host=host\nSpecifies the host name of the machine on which the server is running. If the value\nbegins with a slash, it is used as the directory for the Unix domain socket.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-p",
                        "content": "--port=port\nSpecifies the TCP port or local Unix domain socket file extension on which the server is\nlistening for connections.\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-U",
                        "content": "--username=username\nUser name to connect as.\n",
                        "flag": "-U"
                    },
                    {
                        "name": "-w",
                        "content": "",
                        "flag": "-w"
                    },
                    {
                        "name": "--no-password",
                        "content": "Never issue a password prompt. If the server requires password authentication and a\npassword is not available by other means such as a .pgpass file, the connection attempt\nwill fail. This option can be useful in batch jobs and scripts where no user is present\nto enter a password.\n",
                        "long": "--no-password"
                    },
                    {
                        "name": "-W",
                        "content": "",
                        "flag": "-W"
                    },
                    {
                        "name": "--password",
                        "content": "Force vacuumdb to prompt for a password before connecting to a database.\n\nThis option is never essential, since vacuumdb will automatically prompt for a password\nif the server demands password authentication. However, vacuumdb will waste a connection\nattempt finding out that the server wants a password. In some cases it is worth typing -W\nto avoid the extra connection attempt.\n\n--maintenance-db=dbname\nWhen the -a/--all is used, connect to this database to gather the list of databases to\nvacuum. If not specified, the postgres database will be used, or if that does not exist,\ntemplate1 will be used. This can be a connection string. If so, connection string\nparameters will override any conflicting command line options. Also, connection string\nparameters other than the database name itself will be re-used when connecting to other\ndatabases.\n",
                        "long": "--password"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "PGDATABASE\nPGHOST\nPGPORT\nPGUSER\nDefault connection parameters\n\nPGCOLOR\nSpecifies whether to use color in diagnostic messages. Possible values are always, auto\nand never.\n\nThis utility, like most other PostgreSQL utilities, also uses the environment variables\nsupported by libpq (see Section 34.15).\n",
                "subsections": []
            },
            "DIAGNOSTICS": {
                "content": "In case of difficulty, see VACUUM(7) and psql(1) for discussions of potential problems and\nerror messages. The database server must be running at the targeted host. Also, any default\nconnection settings and environment variables used by the libpq front-end library will apply.\n",
                "subsections": []
            },
            "NOTES": {
                "content": "vacuumdb might need to connect several times to the PostgreSQL server, asking for a password\neach time. It is convenient to have a ~/.pgpass file in such cases. See Section 34.16 for\nmore information.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "To clean the database test:\n\n$ vacuumdb test\n\nTo clean and analyze for the optimizer a database named bigdb:\n\n$ vacuumdb --analyze bigdb\n\nTo clean a single table foo in a database named xyzzy, and analyze a single column bar of the\ntable for the optimizer:\n\n$ vacuumdb --analyze --verbose --table='foo(bar)' xyzzy\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "VACUUM(7)\n\n\n\nPostgreSQL 14.23                                2026                                     VACUUMDB(1)",
                "subsections": []
            }
        }
    }
}