Re: logical decoding - GetOldestXmin - Mailing list pgsql-hackers

From Robert Haas
Subject Re: logical decoding - GetOldestXmin
Date
Msg-id CA+TgmoZFBgE8FMwONw9GY=s5CnFNksXCnfkWet2oi_XYMqG-rw@mail.gmail.com
Whole thread Raw
In response to Re: logical decoding - GetOldestXmin  ("anarazel@anarazel.de" <andres@anarazel.de>)
Responses Re: logical decoding - GetOldestXmin  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Tue, Dec 18, 2012 at 5:25 PM, anarazel@anarazel.de
<andres@anarazel.de> wrote:
> The problem is that at the time GetSnapshotData returns the xmin horizon might have gone upwards and tuples required
fordecoding might get removed by other backends. That needs to be prevented while holding the  procarray lock
exclusively.

Well, for the ordinary use of GetSnapshotData(), that doesn't matter,
because GetSnapshotData() also updates proc->xmin.  If you're trying
to store a different value in that field then of course it matters.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: system administration functions with hardcoded superuser checks
Next
From: Robert Haas
Date:
Subject: Re: system administration functions with hardcoded superuser checks