Re: SSI freezing bug - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: SSI freezing bug
Date
Msg-id 1380638506.34122.YahooMailNeo@web162905.mail.bf1.yahoo.com
Whole thread Raw
In response to Re: SSI freezing bug  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: SSI freezing bug  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> wrote:

> A better solution probably is to promote tuple-level locks if
> they exist to a relation level one upon freezing I guess?

It would be sufficient to promote the tuple lock to a page lock.
It would be pretty easy to add a function to predicate.c which
would accept a Relation and HeapTuple, check for a predicate lock
for the tuple, and add a page lock if found (which will
automatically clear the tuple lock).  This new function would be
called when a tuple was chosen for freezing.  Since freezing always
causes WAL-logging and disk I/O, the cost of a couple hash table
operations should not be noticeable.

This seems like a bug fix which should be back-patched to 9.1, yes?

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: logical changeset generation v6.1
Next
From: Andres Freund
Date:
Subject: Re: SSI freezing bug