From: Andres Freund <andres@anarazel.de>
To: Luca Ferrari <fluca1978@infinito.it>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: xmin increasing within a transaction block?
Date: Mon, 6 Nov 2017 05:29:30 -0800
Message-ID: <20171106132930.jegnqzoswhdcsbl2@alap3.anarazel.de> (raw)
In-Reply-To: <CAKoxK+5Wm6RazPnU8AqB97XRqx5zbY7us00QSVrQgobbgmf8hQ@mail.gmail.com>
References: <CAKoxK+5Wm6RazPnU8AqB97XRqx5zbY7us00QSVrQgobbgmf8hQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>
Hi,
On 2017-11-06 10:36:06 +0100, Luca Ferrari wrote:
> Hi all,
> I suspect this has a trivial explaination, but this is what I'm experiencing:
>
> > CREATE TABLE foo( i int );
> > BEGIN;
> * > INSERT INTO foo(i) VALUES( 1 );
> * > INSERT INTO foo(i) VALUES( 2 );
> * > SELECT xmin, cmin, xmax, cmax, i FROM foo;
> xmin | cmin | xmax | cmax | i
> ------+------+------+------+---
> 2466 | 0 | 0 | 0 | 1
> 2467 | 1 | 0 | 1 | 2
> (2 rows)
>
> * > SELECT txid_current();
> txid_current
> --------------
> 2465
> (1 row)
>
>
> Why is xmin greater than the current transaction id (and most notably
> not "fixed")?
> What am I missing here?
> I'm running 9.6.5.
That doesn't look like plain postgres behaviour to me. Any chance you're
using a pooler in statement mode in front of postgres?
Greetings,
Andres Freund
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andres@anarazel.de, fluca1978@infinito.it
Subject: Re: xmin increasing within a transaction block?
In-Reply-To: <20171106132930.jegnqzoswhdcsbl2@alap3.anarazel.de>
References: <CAKoxK+5Wm6RazPnU8AqB97XRqx5zbY7us00QSVrQgobbgmf8hQ@mail.gmail.com> <20171106132930.jegnqzoswhdcsbl2@alap3.anarazel.de>
* 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