Re: SSI freezing bug

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: SSI freezing bug
Date: 2013-10-01 14:43:45
Message-ID: 20131001144345.GC3001247@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-10-01 07:41:46 -0700, Kevin Grittner wrote:
> Andres Freund <andres(at)2ndquadrant(dot)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.

Yea, not sure why I was thinking of table level locks.

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

Yes.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Johnston 2013-10-01 14:49:31 Re: Documentation for SET var_name FROM CURRENT
Previous Message Kevin Grittner 2013-10-01 14:41:46 Re: SSI freezing bug