External functions/languages and transactions

Поиск
Список
Период
Сортировка
Искать
От
Philip Warner
Тема
External functions/languages and transactions
Дата
Msg-id
3.0.5.32.19990609171307.009dc670@mail.rhyme.com.au
Список
Дерево обсуждения
External functions/languages and transactions Philip Warner <pjw@rhyme.com.au>
Re: [HACKERS] External functions/languages and transactions wieck@debis.com (Jan Wieck)
Dear All,

I've been working (a little) on external functions and laguages recently, and was wondering how PG handles updates to libraries and/or stored procedures in the context of transactions. This is probably most relevant to Perl, but really applies to any external function.

If:

1. user A starts a TX, and calls a user defined function in userlib.so, 
2. user B changes, recompiles, and reloads the shared library
3. user A calls the same function within the same TX.

Does PG prevent the 'load' command by user B (via locking)?
Does user A get a different result?
Does user A's backend not load the new module until after a commit?

In the extreme case this is obvoiusly totally outside the control of PostgreSQL, but in the case of Perl, which includes all sorts of external files, should the implementor of PL/Perl be careful to NOT update already loaded module? Or to update them ASAP?

This is probably too unlikely to worry about, but I am (academically) interested...


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.C.N. 008 659 498)             |          /(@)   ______---_
Tel: +61-03-5367 7422            |                 _________  \
Fax: +61-03-5367 7430            |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/

В списке pgsql-hackers по дате отправления
От: Philip Warner
Дата:
От: Daniel Kalchev
Дата:
FAQ