pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Matthijs Bomhoff <matthijs@quarantainenet.nl>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: Bug with plpgsql, temp tables and TOAST?
Date: Fri, 01 Jul 2011 17:59:37 -0400
Message-ID: <6038.1309557577@sss.pgh.pa.us> (raw)
In-Reply-To: <1309363131-sup-6268@alvh.no-ip.org>
References: <0C41674C-FA02-4768-9E1B-548E568875BD@quarantainenet.nl>
	<1309363131-sup-6268@alvh.no-ip.org>

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Hmm, so what's happening here, I think, is that the value is getting
> assigned to the record variable without detoasting.  I guess we should
> detoast the value prior to assigning it, but it seems to me that that
> would have a large performance penalty for other cases in which the
> toast table is not dropped; in fact, you can even imagine some cases in
> which the toasted value is not even accessed, so getting to the point of
> detoasting it would be a severe penalization.

Yeah, we have seen similar reports before, and concluded that forcibly
detoasting on the remote chance that the toast table wouldn't stick
around was just untenable from a performance standpoint.  It's annoying
but I don't see a good compromise solution ATM.

Pavel was working recently on a hack to prevent repeated detoastings,
which is at least somewhat related to this issue.  I don't recall that
anyone liked his hack though ...

			regards, tom lane



view thread (5+ messages)

Message-ID: <6038.1309557577@sss.pgh.pa.us>
Permalink:  ../6038.1309557577@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6038.1309557577@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@commandprompt.com, matthijs@quarantainenet.nl
  Subject: Re: Bug with plpgsql, temp tables and TOAST?
  In-Reply-To: <6038.1309557577@sss.pgh.pa.us>
  References: <0C41674C-FA02-4768-9E1B-548E568875BD@quarantainenet.nl> <1309363131-sup-6268@alvh.no-ip.org> <6038.1309557577@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox