Discussion:
[GENERAL] Can stored procedures be deployed online
(too old to reply)
Rakesh Kumar
2016-08-01 16:48:57 UTC
Permalink
Can an existing stored procedure be modified online while other users
are executing it. In Oracle, the session doing CREATE OR REPLACE
PACKAGE would wait for other session to complete. Once the package is
changed, first time other sessions will get an error "package
invalidated". How is it in PG.

thanks.
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Karsten Hilbert
2016-08-01 17:29:45 UTC
Permalink
Post by Rakesh Kumar
Can an existing stored procedure be modified online while other users
are executing it. In Oracle, the session doing CREATE OR REPLACE
PACKAGE would wait for other session to complete. Once the package is
changed, first time other sessions will get an error "package
invalidated". How is it in PG.
If you Read The Fine Manual

https://www.postgresql.org/docs/devel/static/index.html

I am pretty sure there's something about DDL transactibility
related to CREATE FUNCTION

https://www.postgresql.org/docs/devel/static/sql-createfunction.html

In particular, by extension, the example way at the bottom
seems relevant to your question.

Regards,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...