Skip site navigation (1) Skip section navigation (2)

Re: Is the attribute options cache actually worth anything?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is the attribute options cache actually worth anything?
Date: 2011-09-05 16:56:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Tom Lane wrote:
> So while poking at a recent example from Marc Cousin (hundreds of tables
> each with 1000 attributes) I observed that a simple ANALYZE would bloat
> the backend process to the tune of several hundred megabytes.  I think
> there is a leak in CacheMemoryContext, but haven't tracked it down yet.
> But I also noticed that tens of megabytes were disappearing into "Attopt
> cache", and after reading the code to see what the heck that was, I am
> wondering what the justification for having it is at all.  In the
> presumably normal case where the attribute hasn't got options, all it's
> saving us is a syscache access, which is probably not noticeably more
> expensive than the hash lookup.  In the case where there is an option,
> it's saving us an attribute_reloptions() call, but it's not apparent
> to me that that's so expensive as to justify putting a cache in front
> of it, especially not if we're going to do a palloc cycle anyway.
> Did anybody do any performance measurements to demonstrate that this
> code has a reason to live?  Because if I don't see some, I'm going
> to rip it out.

Did we decide to keep the cache in attoptcache.c?  Is this a TODO?

  Bruce Momjian  <bruce(at)momjian(dot)us>

  + It's impossible for everything to be true. +

In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-09-05 17:01:26
Subject: Re: toast tables on system catalogs
Previous:From: Tom LaneDate: 2011-09-05 16:40:14
Subject: Reminder: 9.1 release is upcoming

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group