Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i04sB-00008c-Ru for pgsql-docs@arkaria.postgresql.org; Tue, 20 Aug 2019 14:12:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i04sA-0007vt-7T for pgsql-docs@arkaria.postgresql.org; Tue, 20 Aug 2019 14:12:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i04s9-0007lO-Rw for pgsql-docs@lists.postgresql.org; Tue, 20 Aug 2019 14:12:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i04s7-0006Oh-LT for pgsql-docs@lists.postgresql.org; Tue, 20 Aug 2019 14:12:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x7KECOMK006131; Tue, 20 Aug 2019 10:12:24 -0400 From: Tom Lane To: zyake.mk4@gmail.com cc: pgsql-docs@lists.postgresql.org Subject: Re: Required locks for ANALYZE In-reply-to: <156628723253.1296.7377373462603881976@wrigleys.postgresql.org> References: <156628723253.1296.7377373462603881976@wrigleys.postgresql.org> Comments: In-reply-to PG Doc comments form message dated "Tue, 20 Aug 2019 07:47:12 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6128.1566310344.1@sss.pgh.pa.us> Date: Tue, 20 Aug 2019 10:12:24 -0400 Message-ID: <6129.1566310344@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Doc comments form writes: > Therefore, in my opinion, the below paragraph should be amended as below. > * Before > ----- > ANALYZE requires only a read lock on the target table, so it can run in > parallel with other activity on the table. > ----- > * After > ----- > ANALYZE requires only a SHARE UPDATE EXCLUSIVE lock on the target table, so > it can run in parallel with queries requiring ACCESS SHARE/ROW SHARE/ROW > EXCLUSIVE locks such as SELECT, UPDATE, DELETE, INSERT on the table. > ----- This does not really seem like an improvement. The second formulation is pedantically correct, but also unintelligible. Maybe we could make it say "run in parallel with non-DDL activity" ? regards, tom lane