From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Kumar <helloamit5@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: amit.jain@netcore.co.in
Subject: Re: Sometime Update is not modifying data inside database.
Date: Mon, 30 Jul 2012 09:53:05 -0400
Message-ID: <27773.1343656385@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJ6=GOfS96oEjkV-VpnyFKTJXuWYaySj+WtY-jHVmPg0X1Nk+g@mail.gmail.com>
References: <CAJ6=GOfS96oEjkV-VpnyFKTJXuWYaySj+WtY-jHVmPg0X1Nk+g@mail.gmail.com>
Amit Kumar <helloamit5@gmail.com> writes:
> <snip>
> 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
> </snip>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, helloamit5@gmail.com, amit.jain@netcore.co.in
Subject: Re: Sometime Update is not modifying data inside database.
In-Reply-To: <27773.1343656385@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox