Re: Should heap_update/heap_delete hold buffer locks while toasting?

From: Jan Wieck <janwieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should heap_update/heap_delete hold buffer locks while toasting?
Date: 2001-01-08 18:37:04
Message-ID: 200101081837.NAA08409@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> The way that heap_update() and heap_delete() are currently coded, they
> hold the buffer context lock on the buffer containing the old tuple
> while they invoke heap_tuple_toast_attrs(). This strikes me as at least
> inefficient and at worst a source of deadlock. Is it possible to avoid
> holding the buffer lock while doing the TOAST manipulations?

Since the TOAST table access is doing it's own locking on the
TOAST tables, I think it'd be possible to move it outside of
the buffer lock.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-01-08 19:00:27 Re: Assuming that TAS() will succeed the first time is verboten
Previous Message Jan Wieck 2001-01-08 18:05:41 Re: is_view seems unnecessarily slow