Robert Haas <robertmh...@gmail.com> writes: > The more general issue here is what to do about our > high backend startup costs. Beyond trying to recycle backends for new > connections, as I've previous proposed and with all the problems it > entails, the only thing that looks promising here is to try to somehow > cut down on the cost of populating the catcache and relcache, not that > I have a very clear idea how to do that.
One comment to make here is that it would be a serious error to focus on the costs of just starting and stopping a backend; you have to think about cases where the backend does at least some useful work in between, and that means actually *populating* those caches (to some extent) not just initializing them. Maybe your wording above was chosen with that in mind, but I think onlookers might easily overlook the point. FWIW, today I've been looking into getting rid of the silliness in build_index_pathkeys whereby it reconstructs pathkey opfamily OIDs from sortops instead of just using the index opfamilies directly. It turns out that once you fix that, there is no need at all for relcache to cache per-index operator data (the rd_operator arrays) because that's the only code that uses 'em. I don't see any particular change in the runtime of the regression tests from ripping out that part of the cached data, but it ought to have at least some beneficial effect on real startup time. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers