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 1hGl0W-0000a1-QI for pgsql-admin@arkaria.postgresql.org; Wed, 17 Apr 2019 13:53:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGl0V-0000zK-Hd for pgsql-admin@arkaria.postgresql.org; Wed, 17 Apr 2019 13:53:47 +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 1hGl0V-0000wd-57 for pgsql-admin@lists.postgresql.org; Wed, 17 Apr 2019 13:53:47 +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.89) (envelope-from ) id 1hGl0S-0003SY-Ss for pgsql-admin@postgresql.org; Wed, 17 Apr 2019 13:53:45 +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 x3HDrh3r028177; Wed, 17 Apr 2019 09:53:43 -0400 From: Tom Lane To: pavan95 cc: pgsql-admin@postgresql.org Subject: Re: Too many serialization errors in production In-reply-to: <1555481397393-0.post@n3.nabble.com> References: <1555481397393-0.post@n3.nabble.com> Comments: In-reply-to pavan95 message dated "Tue, 16 Apr 2019 23:09:57 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28175.1555509222.1@sss.pgh.pa.us> Date: Wed, 17 Apr 2019 09:53:42 -0400 Message-ID: <28176.1555509222@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk pavan95 writes: > We are facing the error "*could not serialize due to concurrent update*" too > many times in our production server. Why do you think there are too many? For an app that's depending on isolation levels above Read Committed, that's an expected behavior. > My concern here is if I change this isolation level to "Read Committed" will > this suffice to stop this error occurrence? You wouldn't see any more of those errors, but almost certainly you'd have broken the application. Presumably, it's depending on retrying serialization failures to ensure consistency across concurrent updates. Without the retries, such cases would likely soon lead to inconsistent data. > Could you please suggest me how to stop any user from changing the > default_transaction_isolation in PostgreSQL? That's a spectacularly bad idea. regards, tom lane