"David G. Johnston" <david.g.johnston@xxxxxxxxx> writes: > On Wed, Feb 19, 2025 at 1:57 PM Siraj G <tosiraj.g@xxxxxxxxx> wrote: >> But I wonder if pg_dump does acquire locks? > Everything acquires locks (basically). It is the specific nature of the > locks held and requested that matter. For more color on that see https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES particularly the table of lock mode conflicts. pg_dump generally takes ACCESS SHARE locks on the tables it plans to dump, which is the same lock level taken by a plain SELECT. That will only block ACCESS EXCLUSIVE locks, which by and large are only taken by major DDL operations. regards, tom lane