heap_freeze_tuple locking requirements

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: heap_freeze_tuple locking requirements
Date: 2012-03-22 00:50:24
Message-ID: CA+TgmoZd8ScNrUo-OnQXQaV+L0B4ivfwsU9jDZrWXq-a_Ng4jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

heap_freeze_tuple() was apparently designed at one point to cope with
being called with either a shared or exclusive buffer lock. But none
of the current callers call it with a shared lock; they all call it
with an exclusive lock, except for the heap-rewrite code which doesn't
take (or need) a lock at all. But, meanwhile, the comments for that
function claim that vacuum does call it that way, which is incorrect,
and AFAICT has been at least since HOT went in. Attached is a
proposed patch that cleans all of this up by removing support for
calling it with just a shared lock and removing or adjusting various
related comments.

Since this is just dead code removal, I propose to apply this to 9.2.

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

Attachment Content-Type Size
heap-freeze-exclusive-only.patch application/octet-stream 6.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2012-03-22 00:57:00 Re: Memory usage during sorting
Previous Message Tom Lane 2012-03-22 00:44:08 Re: HOT updates & REDIRECT line pointers