Alvaro Herrera <alvhe...@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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs