Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfjzs-001wtw-QI for pgsql-admin@arkaria.postgresql.org; Thu, 29 Feb 2024 17:15:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rfjzr-006HDP-4P for pgsql-admin@arkaria.postgresql.org; Thu, 29 Feb 2024 17:15:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfjzq-006HDH-Pl for pgsql-admin@lists.postgresql.org; Thu, 29 Feb 2024 17:15:03 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfjzn-002BeL-Nh for pgsql-admin@lists.postgresql.org; Thu, 29 Feb 2024 17:15:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 41THEwre2711365; Thu, 29 Feb 2024 12:14:58 -0500 From: Tom Lane To: Bindra <11bindra11@gmail.com> cc: pgsql-admin@lists.postgresql.org Subject: Re: pg_dump blocks insert update on table In-reply-to: References: Comments: In-reply-to Bindra <11bindra11@gmail.com> message dated "Thu, 29 Feb 2024 20:36:40 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2711363.1709226898.1@sss.pgh.pa.us> Date: Thu, 29 Feb 2024 12:14:58 -0500 Message-ID: <2711364.1709226898@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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