SSI freezing bug

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>
Subject: SSI freezing bug
Date: 2013-09-20 10:55:36
Message-ID: 523C29A8.20904@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Prompted by Andres Freund's comments on my Freezing without Write I/O
patch, I realized that there's there's an existing bug in the way
predicate locking handles freezing (or rather, it doesn't handle it).

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.

- Heikki

Attachment Content-Type Size
freezetest.spec text/x-rpm-spec 1.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-20 11:44:45 Re: dynamic shared memory
Previous Message Andres Freund 2013-09-20 10:33:47 Re: logical changeset generation v6