pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bindra <11bindra11@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump blocks insert update on table
Date: Thu, 29 Feb 2024 12:14:58 -0500
Message-ID: <2711364.1709226898@sss.pgh.pa.us> (raw)
In-Reply-To: <CABeMV7Pq07Ebe8Guh50qna=Om6mLa6Q6MJC_odagRTfe7WPW-Q@mail.gmail.com>
References: <CABeMV7Pq07Ebe8Guh50qna=Om6mLa6Q6MJC_odagRTfe7WPW-Q@mail.gmail.com>

Bindra <11bindra11@gmail.com> writes:
> We are using PostgreSQL 11.17

You realize that 11.x is out of support, right?

> While doing pg_dumpall, it blocks insert/update on some table where copy
> statemnets is executed.

pg_dump only takes AccessShareLock on tables it dumps.  That does not
block inserts or updates.  What may be happening is that you have some
third process that is trying to take an exclusive lock on the table.
It will queue up behind pg_dump's nonexclusive lock, and then other
operations such as insert/update will block behind it.  This is just
speculation since you've provided zero detail, but that's what I'd
look for.  The pg_locks view could help you identify the culprit.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <2711364.1709226898@sss.pgh.pa.us>
Permalink:  ../2711364.1709226898@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2711364.1709226898@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, 11bindra11@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: pg_dump blocks insert update on table
  In-Reply-To: <2711364.1709226898@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox