Re: BUG #14639: Different xmin values in a transaction

From: Ray Warren <Ray(dot)Warren(at)artsalliancemedia(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14639: Different xmin values in a transaction
Date: 2017-05-02 16:25:33
Message-ID: 4DD2043D33498E4B82FF57B256C47540D52001@ex-04.aam.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Andres,

I care about xmin values because we have a very high number of inserts/updates/deletes and we get a Vacuum Freeze (from autovacuum) occurring every few days so I want to reduce that happening. The application is doing inserts in batches so I expected to see batches with the same xmin. When I found they were all different I then identified what I thought was an issue with the partition function. We can work around it but I wasn't expecting this behaviour.

Regards ... Ray

-----Original Message-----
From: Andres Freund [mailto:andres(at)anarazel(dot)de]
Sent: 02 May 2017 17:13
To: Ray Warren
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] BUG #14639: Different xmin values in a transaction

On 2017-05-02 15:57:39 +0000, ray(dot)warren(at)artsalliancemedia(dot)com wrote:
> Under certain conditions inserts in the same transaction are getting
> different xmin values.
> A reproducible example is below. I can work around it but I think this
> is a bug.

That's to be expected if you use savepoints (and EXCEPTION blocks use those internally). Why do you care about xmin value?

Greetings,

Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2017-05-02 16:45:35 Re: Concurrent ALTER SEQUENCE RESTART Regression
Previous Message Andres Freund 2017-05-02 16:13:20 Re: BUG #14639: Different xmin values in a transaction