From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com> |
Subject: | Re: SSI freezing bug |
Date: | 2013-09-20 11:57:28 |
Message-ID: | 20130920115728.GB25971@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2013-09-20 13:53:04 +0200, Andres Freund wrote:
> Hi,
>
>
> On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote:
> > When a tuple is predicate-locked, the key of the lock is ctid+xmin. However,
> > when a tuple is frozen, its xmin is changed to FrozenXid. That effectively
> > invalidates any predicate lock on the tuple, as checking for a lock on the
> > same tuple later won't find it as the xmin is different.
> >
> > Attached is an isolationtester spec to demonstrate this.
>
> Do you have any idea to fix that besides keeping the xmin horizon below the
> lowest of the xids that are predicate locked? Which seems nasty to
> compute and is probably not trivial to fit into the procarray.c
> machinery?
A better solution probably is to promote tuple-level locks if they exist
to a relation level one upon freezing I guess?
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2013-09-20 11:59:09 | Re: [PATCH] pg_sleep(interval) |
Previous Message | Andres Freund | 2013-09-20 11:53:04 | Re: SSI freezing bug |