Chapter 55. Reorganizing Tables

Table of Contents

55.1. Usage

PostgreSQL Enterprise Server (PgES) provides support for reorganizing tables online, with minimal locks. You can choose one of the following methods to reorganize:

Note

The target table(s) must have a PRIMARY KEY, or at least a UNIQUE total index on a NOT NULL column.

Performing a full-table repack requires free disk space about twice as large as the target table(s) and its indexes. For example, if the total size of the tables and indexes to be reorganized is 1GB, an additional 2GB of disk space is required.