Re: CREATE OR REPLACE FUNCTION vs ownership

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: CREATE OR REPLACE FUNCTION vs ownership
Дата
Msg-id
19388.1254498542@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
CREATE OR REPLACE FUNCTION vs ownership Tom Lane <tgl@sss.pgh.pa.us>
Re: CREATE OR REPLACE FUNCTION vs ownership Stephen Frost <sfrost@snowman.net>
Re: CREATE OR REPLACE FUNCTION vs ownership Pavel Stehule <pavel.stehule@gmail.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Tom Lane <tgl@sss.pgh.pa.us>
Re: CREATE OR REPLACE FUNCTION vs ownership "David E. Wheeler" <david@kineticode.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Euler Taveira de Oliveira <euler@timbira.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Robert Haas <robertmhaas@gmail.com>
Re: CREATE OR REPLACE FUNCTION vs ownership KaiGai Kohei <kaigai@ak.jp.nec.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Tom Lane <tgl@sss.pgh.pa.us>
Re: CREATE OR REPLACE FUNCTION vs ownership "David E. Wheeler" <david@kineticode.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Tom Lane <tgl@sss.pgh.pa.us>
Re: CREATE OR REPLACE FUNCTION vs ownership "David E. Wheeler" <david@kineticode.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Robert Haas <robertmhaas@gmail.com>
Re: CREATE OR REPLACE FUNCTION vs ownership KaiGai Kohei <kaigai@ak.jp.nec.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Robert Haas <robertmhaas@gmail.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Caleb Welton <cwelton@greenplum.com>
Re: CREATE OR REPLACE FUNCTION vs ownership Robert Haas <robertmhaas@gmail.com>
"David E. Wheeler"  writes:
> Okay, this convinces me otherwise. But is it not in fact the case that  
> CREATE OR REPLACE FUNCTION doesn't expire the old version of the  
> function in the cache of other processes?

It is not.

> Don't those processes have  
> to reconnect in order to see the new function?

The ideal is that backends will start using the new function
implementation on the next call after the REPLACE commits (but any
evaluations already in progress must of course continue with the text
they have).  We have been gradually getting closer to that ideal over
the years, although I think there are still cases where it will take a
little longer --- for instance if a SQL function gets inlined I think
the inlined code will persist for the duration of the query's execution.
I don't believe there are still any cases where you actually have to
reconnect to get it to notice the update.

(At least this is true for plpgsql --- not sure if all the other PLs
are equally up to speed.)
		regards, tom lane

В списке pgsql-hackers по дате отправления
От: Jeff Davis
Дата:
От: David E. Wheeler
Дата:
FAQ