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 1hGdlo-0004zs-Bk for pgsql-admin@arkaria.postgresql.org; Wed, 17 Apr 2019 06:10:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGdlm-0003Wg-4F for pgsql-admin@arkaria.postgresql.org; Wed, 17 Apr 2019 06:10:06 +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 1hGdll-0003WY-Nm for pgsql-admin@lists.postgresql.org; Wed, 17 Apr 2019 06:10:05 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hGdlf-0001aa-0V for pgsql-admin@postgresql.org; Wed, 17 Apr 2019 06:10:04 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 685D5135B1D27 for ; Tue, 16 Apr 2019 23:09:57 -0700 (MST) Date: Tue, 16 Apr 2019 23:09:57 -0700 (MST) From: pavan95 To: pgsql-admin@postgresql.org Message-ID: <1555481397393-0.post@n3.nabble.com> Subject: Re: Too many serialization errors in production MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Community, We are facing the error "*could not serialize due to concurrent update*" too many times in our production server. The errors are occurring due to the "Repeatable Read" isolation level. I know that the database default_transaction_isolation is "Read Committed" where we don't get these errors. But when I monitored the queries the application(ODOO) user is issuing "SET default_transaction_isolation to Repeatable Read". So is the cause of these errors. I have explored on the ODOO application side where in which I lost somewhere but found to know that these errors are common for ODOO. In one of the ODOO application files named "sql_db.py" the below code I have found where I understood the isolation level was set to "Repeatable Read". My concern here is if I change this isolation level to "Read Committed" will this suffice to stop this error occurrence? Else my another approach is how to stop the application user from executing session level command "SET default_transaction_isolation to Repeatable Read" ? Could you please suggest me how to stop any user from changing the default_transaction_isolation in PostgreSQL? Looking forward to hear from you. Regards, Pavan, 9841380956 -- Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html