Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTiYY-0004Vi-6S for pgsql-general@arkaria.postgresql.org; Wed, 18 Jan 2017 05:13:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTiYX-0004fS-Mc for pgsql-general@arkaria.postgresql.org; Wed, 18 Jan 2017 05:13:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTiWE-00025E-SK for pgsql-general@postgresql.org; Wed, 18 Jan 2017 05:10:46 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTiWA-0005Fj-P9 for pgsql-general@postgresql.org; Wed, 18 Jan 2017 05:10:46 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id v0I5AWv00937 for ; Tue, 17 Jan 2017 21:10:32 -0800 Subject: Re: postgresql : could not serialize access due to read/write dependencies among transactions To: pgsql-general@postgresql.org References: From: John R Pierce Message-ID: Date: Tue, 17 Jan 2017 21:10:27 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------3C9259C61B1C20CF39795C91" X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org This is a multi-part message in MIME format. --------------3C9259C61B1C20CF39795C91 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/17/2017 8:54 PM, Neslisah Demirci wrote: > > > could not serialize access due to read/write dependencies among > transactions > only way to answer this would be to know what the various concurrent transactions are doing. > A message app like whatsapp i decided to use isolation level > serializable if i use other transaction levels many conversations > started with same number (think about whatsapp web sidebar multipling > with same number every message). again, we'd need to know what your transactions are doing. what you're describing sounds inherently incorrect, like you're doing too much in the application and not enough in the database > I also add an index to my query and my query's execution plan don't > use seq scan . > that has no bearing on the above problems. -- john r pierce, recycling bits in santa cruz --------------3C9259C61B1C20CF39795C91 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 1/17/2017 8:54 PM, Neslisah Demirci wrote:


could not serialize access due to read/write dependencies among transactions


only way to answer this would be to know what the various concurrent transactions are doing.

A message app like whatsapp i decided to use isolation level serializable if i use other transaction levels many conversations started with same number (think about whatsapp web sidebar multipling with same number every message).

again, we'd need to know what your transactions are doing.   what you're describing sounds inherently incorrect, like you're doing too much in the application and not enough in the database


I also add an index to my query and my query's execution plan don't use seq scan .


that has no bearing on the above problems.


-- 
john r pierce, recycling bits in santa cruz
--------------3C9259C61B1C20CF39795C91--