Re: Missed bet in toaster routines

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Missed bet in toaster routines
Date: 2004-01-16 14:43:46
Message-ID: 4007F8A2.8010002@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Wouldn't it be a win for heap_tuple_toast_attrs() to fall out quickly
> if the tuple contains no varlena attributes? I'm thinking of adding
> a test like
>
> /* Nothing to do if tuple contains no varlena fields */
> if ((newtup && !HeapTupleAllFixed(newtup)) ||
> (oldtup && !HeapTupleAllFixed(oldtup)))
> /* do existing processing */
>
> This is a pretty cheap test (just checking a header flag) and saves lots
> of useless scanning when it succeeds.

Why sure it would. That code is quite frequently called.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-01-16 15:02:32 Re: [GENERAL] Bug and/or feature? Complex data types in tables...
Previous Message Robert Treat 2004-01-16 13:21:52 Re: set search_path and pg_dumpall