Re: Queries getting older values (autocommit enabled)

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Eudald Valcàrcel Lacasa <eudald(dot)valcarcel(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Queries getting older values (autocommit enabled)
Date: 2020-04-24 16:08:56
Message-ID: CAKFQuwbigrLcg5dGD6VUYGa+U-46q7xUgCbbMdPPWJBc3mki1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Apr 24, 2020 at 9:04 AM Eudald Valcàrcel Lacasa <
eudald(dot)valcarcel(at)gmail(dot)com> wrote:

> Hello all,
> I'm facing what seems like a bug and I've reached a dead end without
> finding a solution.
>
> I'm executing a script that work on a postgresql table. This script is
> executed more than once at a time.
> The table contains a column called status.
> One of the scripts is checking the value on the column status and, if it's
> different than 1, it should do nothing. If it's 1 it changes its value to
> the new status (new value can be 1,2,3)
>
>
Read "The Locking Clause" in the SELECT command's documentation page and
see if that helps.

https://www.postgresql.org/docs/12/sql-select.html

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2020-04-24 16:13:25 BUG #16387: postgres12-* packages not in yum repo
Previous Message Tom Lane 2020-04-24 16:08:00 Re: BUG #16386: drop contraint in inherited table is missing in pg_dump backup