Database Locks During Backups

A newer version of this documentation is available. Click here to view the most up-to-date release of the Greenplum 4.x documentation.

Database Locks During Backups

When backing up a database, Greenplum Database locks the following tables:
  1. When a backup starts, an EXCLUSIVE lock is acquired on the catalog table pg_class, which contains database relation information. The EXCLUSIVE lock permits only concurrent read operations. Relations such as tables, indexes, and views cannot be created or dropped in the database.

    While pg_class is locked, schema information is collected on database tables that will be backed up.

    The EXCLUSIVE lock on pg_class is released after an ACCESS SHARE lock is acquired on all the tables that are to be backed up.

  2. The ACCESS SHARE lock is acquired at the segment instance level as a parallel operation. After the data has been backed up for the tables in a segment, the lock on the tables in that segment is released.

    An ACCESS SHARE lock is a lock that is acquired by queries that only read from a table.

    An ACCESS SHARE lock only conflicts with an ACCESS EXCLUSIVE lock. The following SQL statements acquire an ACCESS EXCLUSIVE lock:

For information about the catalog table pg_class, see the Greenplum Database Reference Guide. For information about Greenplum Database lock modes see About Concurrency Control.