Re: Rule recompilation
От | Tom Lane |
---|---|
Тема | Re: Rule recompilation |
Дата | |
Msg-id | 11614.994964142@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Rule recompilation (Jan Wieck <JanWieck@Yahoo.com>) |
Ответы |
Re: Rule recompilation
|
Список | pgsql-hackers |
Jan Wieck <JanWieck@Yahoo.com> writes: > And PL/pgSQL? We don't prepare all the statements into SPI > plans at compile time. We wait until the separate branches > are needed, so how do you know offhand here? If we haven't prepared a statement yet, then we don't need to reprepare it, hmm? So it'd be sufficient to keep track of a list of all objects referenced *so far* by each plpgsql function. Your complaints about pltcl and plperl are irrelevant because they don't save prepared plans. For the languages that do save prepared plans, it seems possible to keep track of a list of all objects that each plan depends on. So I think that we should try to do it right, rather than assuming from the start that we can't. > In the PL/pgSQL case it *might* be possible. But is it worth > it? Yes. If we're not going to do it right, I think we needn't bother to do it at all. "Restart your backend" is just as good an answer, probably better, than "issue a RECOMPILE against everything affected by whatever you changed". If the system can't keep track of that, how likely is it that the user can? regards, tom lane
В списке pgsql-hackers по дате отправления: