Re: DISCARD ALL ; stored procedures
От | Alvaro Herrera |
---|---|
Тема | Re: DISCARD ALL ; stored procedures |
Дата | |
Msg-id | 1294775548-sup-1582@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: DISCARD ALL ; stored procedures (Stephen Frost <sfrost@snowman.net>) |
Список | pgsql-hackers |
Excerpts from Stephen Frost's message of vie ene 07 15:29:52 -0300 2011: > * Stephen Frost (sfrost@snowman.net) wrote: > > * Robert Haas (robertmhaas@gmail.com) wrote: > > > > Making it part of DISCARD PLANS; and back-patching it to 8.3 where > > > > DISCARD was introduced would be awesome for me. :) > > > > > > I'd need to look at this more closely before committing anything, but > > > at first blush I think that's reasonable. Have a patch? > > > > To be honest, I was fully expecting a response of "that's hard to do." > > Soo, yeah, I found the "this is hard" part. Basically, the plan > cacheing, etc, is all handled by the stored procedures themselves, and > we havn't got any way to tell a PL "destroy all your plans." We might > be able to hack up fmgr to throw away all references to functions, but > that wouldn't release the memory they use up, making 'discard plans;' > leak like a sieve. What this discussion suggests to me is that cached plans need to be tracked by a resource owner that's linked to the function. The problem I see with this idea is figure out what module would keep track of resowners that need to be reset ... Other than that I think it should be straightforward :-) -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: