|
1 |
| -<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.74 2007/05/15 15:52:40 neilc Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.75 2007/05/30 19:45:00 momjian Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="maintenance">
|
4 | 4 | <title>Routine Database Maintenance Tasks</title>
|
|
157 | 157 | command. This uses a more aggressive algorithm for reclaiming the
|
158 | 158 | space consumed by dead row versions. Any space that is freed by
|
159 | 159 | <command>VACUUM FULL</command> is immediately returned to the
|
160 |
| - operating system. Unfortunately, this variant of the |
| 160 | + operating system, and the table data is physically compacted on |
| 161 | + the disk. Unfortunately, this variant of the |
161 | 162 | <command>VACUUM</command> command acquires an exclusive lock on
|
162 | 163 | each table while <command>VACUUM FULL</command> is processing
|
163 | 164 | it. Therefore, frequently using <command>VACUUM FULL</command> can
|
|
168 | 169 | <para>
|
169 | 170 | The standard form of <command>VACUUM</> is best used with the goal
|
170 | 171 | of maintaining a fairly level steady-state usage of disk space. If
|
171 |
| - you need to return disk space to the operating system you can use |
| 172 | + you need to return disk space to the operating system, you can use |
172 | 173 | <command>VACUUM FULL</> — but what's the point of releasing disk
|
173 | 174 | space that will only have to be allocated again soon? Moderately
|
174 | 175 | frequent standard <command>VACUUM</> runs are a better approach
|
175 | 176 | than infrequent <command>VACUUM FULL</> runs for maintaining
|
176 |
| - heavily-updated tables. |
| 177 | + heavily-updated tables. However, if some heavily-updated tables |
| 178 | + have gone too long with infrequent <command>VACUUM</>, you can |
| 179 | + use <command>VACUUM FULL</> or <command>CLUSTER</> to get performance |
| 180 | + back (it is much slower to scan a table containing almost only dead |
| 181 | + rows). |
177 | 182 | </para>
|
178 | 183 |
|
179 | 184 | <para>
|
|
0 commit comments