External functions/languages and transactions

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: External functions/languages and transactions
Date: 1999-06-09 07:13:07
Message-ID: 3.0.5.32.19990609171307.009dc670@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 |/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Kalchev 1999-06-09 08:04:28 Postgres 6.5 beta2 and beta3 problem
Previous Message Philip Warner 1999-06-09 06:21:03 Aggregates with context - a question