2016-06-08 04:23:12 -05:00
|
|
|
.. _maintenance_dialog:
|
|
|
|
|
2018-06-15 03:14:12 -05:00
|
|
|
***************************
|
|
|
|
`Maintenance Dialog`:index:
|
|
|
|
***************************
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Use the *Maintenance* dialog to VACUUM, ANALYZE, REINDEX or CLUSTER a database
|
|
|
|
or selected database objects.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
|
|
|
.. image:: images/maintenance.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Maintenance dialog
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
While this utility is useful for ad-hoc maintenance purposes, you are encouraged
|
|
|
|
to perform automatic VACUUM jobs on a regular schedule.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Select a button next to *Maintenance operation* to specify the type of
|
|
|
|
maintenance:
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click *VACUUM* to scan the selected database or table to reclaim storage used
|
|
|
|
by dead tuples.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Move the *FULL* switch to the *Yes* position to compact tables by writing
|
|
|
|
a completely new version of the table file without dead space. The default
|
|
|
|
is *No*.
|
2018-01-11 10:58:30 -06:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Move the *FREEZE* switch to the *Yes* position to freeze data in a table
|
|
|
|
when it will have no further updates. The default is *No*.
|
2018-01-11 10:58:30 -06:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Move the *ANALYZE* switch to the *Yes* position to issue ANALYZE commands
|
|
|
|
whenever the content of a table has changed sufficiently. The default is
|
|
|
|
*No*.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
* Click *ANALYZE* to update the stored statistics used by the query planner.
|
|
|
|
This enables the query optimizer to select the fastest query plan for optimal
|
|
|
|
performance.
|
|
|
|
* Click *REINDEX* to rebuild any index in case it has degenerated due to the
|
|
|
|
insertion of unusual data patterns. This happens, for example, if you insert
|
|
|
|
rows with increasing index values, and delete low index values.
|
2016-06-08 04:23:12 -05:00
|
|
|
* Click *CLUSTER* to instruct PostgreSQL to cluster the selected table.
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
To exclude status messages from the process output, move the *Verbose Messages*
|
|
|
|
switch to the *No* position; by default, status messages are included.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
When you've completed the dialog, click *OK* to start the background process;
|
|
|
|
to exit the dialog without performing maintenance operations, click *Cancel*.
|
2016-06-08 04:23:12 -05:00
|
|
|
|
|
|
|
pgAdmin will inform you when the background process completes:
|
|
|
|
|
|
|
|
.. image:: images/maintenance_complete.png
|
2018-01-11 10:58:30 -06:00
|
|
|
:alt: Maintenance completion notification
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2018-10-22 02:05:21 -05:00
|
|
|
Use the **Stop Process** button to stop the Maintenance process.
|
|
|
|
|
2019-03-08 09:29:05 -06:00
|
|
|
Use the *Click here for details* link on the notification to open the *Process
|
|
|
|
Watcher* and review detailed information about the execution of the command that
|
|
|
|
performed the import or export:
|
2016-06-08 04:23:12 -05:00
|
|
|
|
2018-01-11 10:58:30 -06:00
|
|
|
.. image:: images/maintenance_pw.png
|
|
|
|
:alt: Maintenance process watcher
|
2019-03-08 09:29:05 -06:00
|
|
|
:align: center
|