From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | Siraj G <tosiraj(dot)g(at)gmail(dot)com>, Scott Ribe <scott_ribe(at)elevated-dev(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Does export operation cancel SQLs? |
Date: | 2025-02-19 22:27:45 |
Message-ID: | 2583155.1740004065@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Wed, Feb 19, 2025 at 1:57 PM Siraj G <tosiraj(dot)g(at)gmail(dot)com> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Jerry Sievers | 2025-02-20 07:49:03 | Re: In-place upgrade with streaming replicas |
Previous Message | David G. Johnston | 2025-02-19 22:20:26 | Re: Does export operation cancel SQLs? |