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 1hpzJY-0006FG-Ib for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2019 18:15:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hpzJW-0006yF-UW for pgsql-bugs@arkaria.postgresql.org; Tue, 23 Jul 2019 18:15:02 +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 1hpzJV-0006s9-RO for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2019 18:15:01 +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 1hpzJT-0004C7-Dc for pgsql-bugs@lists.postgresql.org; Tue, 23 Jul 2019 18:15:00 +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 x6NIEuWe008684; Tue, 23 Jul 2019 14:14:56 -0400 From: Tom Lane To: Manuel Rigger cc: PostgreSQL mailing lists Subject: Re: DROP STATISTICS results in "ERROR: tuple concurrently updated" In-reply-to: References: Comments: In-reply-to Manuel Rigger message dated "Tue, 23 Jul 2019 14:01:56 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <8682.1563905696.1@sss.pgh.pa.us> Date: Tue, 23 Jul 2019 14:14:56 -0400 Message-ID: <8683.1563905696@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Manuel Rigger writes: > When running multiple threads that operate on distinct databases, a > "DROP STATISTICS" sometimes results in an error "ERROR: tuple > concurrently updated". Would it be useful to make this error > reproducible, or could this be expected, similar to the VACUUM > deadlocks [1]? I think it'd be worth running to ground, at least. One could imagine that the error is coming from one session trying to delete a statistics row that some other session has updated-and-not-yet-committed; but then the question is why there's not sufficient interlocking to avoid that. regards, tom lane