Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> Looking closer at where that memory is spent, a lot of it goes into the
> FmgrInfo structs in RelationAmInfo. But some of them are outright unused
> (ambuild, ambuildempty, amcostestimate, amoptions), and a few others
> hardly are called so seldom that they hardly need to be cached
> (ambuildelete, ambacuumcleanup). Removing those fields, patch attached,
> reduces the memory usage nicely:
+1, but it would look nicer if you could encapsulate the code in some
macro analogous to GET_REL_PROCEDURE(), perhaps call it
GET_UNCACHED_REL_PROCEDURE()?
regards, tom lane