Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5981116AF4E5 for ; Mon, 30 Jul 2012 10:53:26 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SvqPS-0001Qo-W0 for pgsql-admin@postgresql.org; Mon, 30 Jul 2012 13:53:25 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q6UDr5Rn027774; Mon, 30 Jul 2012 09:53:05 -0400 (EDT) From: Tom Lane To: Amit Kumar cc: pgsql-admin@postgresql.org, amit.jain@netcore.co.in Subject: Re: Sometime Update is not modifying data inside database. In-reply-to: References: Comments: In-reply-to Amit Kumar message dated "Mon, 30 Jul 2012 16:36:54 +0530" Date: Mon, 30 Jul 2012 09:53:05 -0400 Message-ID: <27773.1343656385@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/102 X-Sequence-Number: 39819 Amit Kumar writes: > > Jul 30 12:40:36 dell16 postgres[11088]: [11-1] 2012-07-30 12:40:36 IST > [11088]: [10-1] user=postgres,db=dbpush xxxxxxxxxxxxxxxxxx(43225)LOG: > statement: START TRANSACTION > Jul 30 12:40:36 dell16 postgres[11088]: [12-1] 2012-07-30 12:40:36 IST > [11088]: [11-1] user=postgres,db=dbpush xxxxxxxxxxxxxxxxxx(43225)LOG: > statement: *UPDATE dbpush_camp_main SET status=7 WHERE camp_id IN(137721)* > Jul 30 12:40:36 dell16 postgres[11088]: [13-1] 2012-07-30 12:40:36 IST > [11088]: [12-1] user=postgres,db=dbpush xxxxxxxxxxxxxxxxxx(43225)LOG: > statement: COMMIT > Jul 30 12:40:36 dell16 postgres[9368]: [5-1] 2012-07-30 12:40:36 IST > [9368]: [4-1] user=postgres,db=dbpush xxxxxxxxxxxxxxxxxx(43187)LOG: > statement: SELECT status FROM dbpush_camp_main WHERE camp_id=137721 > I assume what you're complaining about is that PID 9368's select didn't see the result of pid 11088's update? The above trace doesn't prove that anything is wrong. That behavior would be expected if 9368 had taken its "snapshot" before 11088's commit finished, and you can't really tell if that was the case or not from these log entries. But given they all happened in less than 1 second, it's certainly possible. regards, tom lane