Re: Queries getting older values (autocommit enabled) - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Queries getting older values (autocommit enabled)
Date
Msg-id 4391.1587744928@sss.pgh.pa.us
Whole thread Raw
In response to Queries getting older values (autocommit enabled)  (Eudald Valcàrcel Lacasa <eudald.valcarcel@gmail.com>)
Responses Re: Queries getting older values (autocommit enabled)
List pgsql-bugs
=?UTF-8?Q?Eudald_Valc=C3=A0rcel_Lacasa?= <eudald.valcarcel@gmail.com> writes:
> Could it be possible that, somehow, the select query starts before the
> update one, although it's printed as if it's being executed after it?

It's certainly possible that the select is using a snapshot that was
taken before the update commits.  You should read this chapter of
the manual for background and some hints:

https://www.postgresql.org/docs/current/mvcc.html

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16387: postgres12-* packages not in yum repo
Next
From: Eudald Valcàrcel Lacasa
Date:
Subject: Re: Queries getting older values (autocommit enabled)