From: Tom Lane <tgl@sss.pgh.pa.us>
To: Eudald ValcĂ rcel Lacasa <eudald.valcarcel@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Queries getting older values (autocommit enabled)
Date: Fri, 24 Apr 2020 12:15:28 -0400
Message-ID: <4391.1587744928@sss.pgh.pa.us> (raw)
In-Reply-To: <CANEx+AWKWfNb5zogXb8OfqhQOHHOMbHzDi7fKms05yGCxX5Bwg@mail.gmail.com>
References: <CANEx+AWKWfNb5zogXb8OfqhQOHHOMbHzDi7fKms05yGCxX5Bwg@mail.gmail.com>
=?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
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, eudald.valcarcel@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: Queries getting older values (autocommit enabled)
In-Reply-To: <4391.1587744928@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