Re: Reducing overhead for repeat de-TOASTing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Reducing overhead for repeat de-TOASTing
Date: 2008-06-17 18:31:03
Message-ID: 3446.1213727463@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Teodor Sigaev <teodor(at)sigaev(dot)ru> writes:
>> But we can resolve that by ruling that the required lifetime is the same
>> as the value would have had if it'd really been palloc'd --- IOW, until
>> the memory context that was current at the time gets deleted or reset.

> Many support functions of GiST/GIN live in very short memory context - only for
> one call. So, that cache invalidation technique doesn't give any advantage
> without rearranging this part.

Right, but I think I've got that covered. The memory context reset
won't actually flush the toast cache entry, it effectively just drops its
reference count. We'll only drop cache entries when under memory
pressure (or if they're invalidated by toast table updates/deletes).

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-06-17 18:36:18 Re: GIN improvements
Previous Message Teodor Sigaev 2008-06-17 18:25:46 Re: GIN improvements