Re: The missing pg_get_*def functions

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: The missing pg_get_*def functions
Дата
Msg-id 20130430135702.GC25261@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: The missing pg_get_*def functions  (Joel Jacobson <joel@trustly.com>)
Ответы Re: The missing pg_get_*def functions  (Andres Freund <andres@2ndquadrant.com>)
Re: The missing pg_get_*def functions  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On 2013-04-30 05:14:15 +0100, Joel Jacobson wrote:
> On Tue, Apr 30, 2013 at 12:58 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Noah Misch <noah@leadboat.com> writes:
> >> Note also that minor releases can readily fix bugs in C-language functions,
> >> but we have no infrastructure to update sql-language functions after initdb.
> >> That flexibility is unfortunate to lose, particularly for something that
> >> pg_dump depends on.
> >
> > That alone would probably be sufficient reason why we would never allow
> > pg_dump to depend on any such thing (not that I see a compelling
> > argument for it to do so anyway...).
> 
> It would be better to find a way to update sql-language functions in
> minor upgrades, instead of shutting that door entirely for all future
> implementation ideas involving sql-language functions in the
> pg_catalog.

I'd be very careful with jumping on this task. I am pretty sure its a
very good way to get very, very frustrated if you don't present a widely
accepted design beforehand. Doing this correctly is *far far* from easy.

Just a little collection of problems:
* You need to connect to all databases, not just one. There's no infrastructure for this.
* You need to do the update *before* allowing any external connections. Otherwise the feature won't be useful to fix
actualproblems. Again, there is no infrastructure for this.
 
* You need to do it in a way that a) doesn't slow down normal startup b) doesn't break if the update has only been
appliedto 9999 of 10000 databases.
 


FWIW I really, really doubt you can do all the functions referred to
upthread sensibly and correctly from SQL functions. The infrastructure
to do this just isn't there.

Besides, I really don't buy this helping pg_dump. I think the far more
realistic course here is to put some parts that are required by pg_dump
and by such functions in some common library that then can *also* be
used by such backend functions. But thats a humongous task that, besides
deep technical knowledge in lots of areas, requires quite a bit of
politics.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Remaining beta blockers
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Remaining beta blockers