Re: [GENERAL] xmin increasing within a transaction block? - Mailing list pgsql-general

From Andres Freund
Subject Re: [GENERAL] xmin increasing within a transaction block?
Date
Msg-id 20171106132930.jegnqzoswhdcsbl2@alap3.anarazel.de
Whole thread Raw
In response to [GENERAL] xmin increasing within a transaction block?  (Luca Ferrari <fluca1978@infinito.it>)
Responses Re: [GENERAL] xmin increasing within a transaction block?
List pgsql-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

pgsql-general by date:

Previous
From: Vikas Sharma
Date:
Subject: [GENERAL] Postgresql 9.3 service doesn't start on RedHat Linux 6.8
Next
From: Sachin Kotwal
Date:
Subject: Re: [GENERAL] Naming conventions for column names