Skip to content

Commit 5665561

Browse files
fabioperrellaManagorMachiavelliIIdmmqz
authored
vacuumdb: add page (#18370)
Co-authored-by: Managor <[email protected]> Co-authored-by: Machiavelli <[email protected]> Co-authored-by: Dylan <[email protected]>
1 parent f4d6fa8 commit 5665561

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pages/common/vacuumdb.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# vacuumdb
2+
3+
> Garbage-collect and analyze a PostgreSQL database.
4+
> More information: <https://www.postgresql.org/docs/current/app-vacuumdb.html>.
5+
6+
- Vacuum a specific database:
7+
8+
`vacuumdb {{database_name}}`
9+
10+
- Vacuum all databases:
11+
12+
`vacuumdb {{[-a|--all]}}`
13+
14+
- Vacuum a specific table in a database:
15+
16+
`vacuumdb {{[-t|--table]}} {{table_name}} {{database_name}}`
17+
18+
- Vacuum and update statistics for the query planner:
19+
20+
`vacuumdb {{[-z|--analyze]}} {{database_name}}`
21+
22+
- Perform a full vacuum (more aggressive, locks tables, rewrites the whole table):
23+
24+
`vacuumdb {{[-f|--full]}} {{database_name}}`
25+
26+
- Vacuum with verbose output:
27+
28+
`vacuumdb {{[-v|--verbose]}} {{database_name}}`
29+
30+
- Vacuum a database using multiple parallel jobs:
31+
32+
`vacuumdb --jobs {{number_of_jobs}} {{database_name}}`

0 commit comments

Comments
 (0)