Concurrent modification of plpgsql function body

Started by Alex Vinogradovsover 18 years ago6 messagesgeneral
Jump to latest
#1Alex Vinogradovs
AVinogradovs@Clearpathnet.com

Hello all,

I've got an application that keeps a persistent connection into the
database and constantly executes number of stored functions. Sometimes
I need to modify the implementation of those functions to change the
data layout, but doing that results in errors like this:

unrecognized node type: 1852387187

Is it allowed to modify those functions from other connections ?

Thanks!

Best regards,
Alex Vinogradovs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alex Vinogradovs (#1)
Re: Concurrent modification of plpgsql function body

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

I've got an application that keeps a persistent connection into the
database and constantly executes number of stored functions. Sometimes
I need to modify the implementation of those functions to change the
data layout, but doing that results in errors like this:

unrecognized node type: 1852387187

This report is far too vague to give a useful reply to.
What exactly do you mean by "modify the implementation"?

regards, tom lane

#3Alex Vinogradovs
AVinogradovs@Clearpathnet.com
In reply to: Tom Lane (#2)
Re: Concurrent modification of plpgsql function body

I mean I re-create the function with the same signature but
different body, and when the application invokes that function
again, it starts getting those errors.

Alex.

Show quoted text

On Fri, 2008-01-04 at 15:36 -0500, Tom Lane wrote:

Alex Vinogradovs <AVinogradovs@Clearpathnet.com> writes:

I've got an application that keeps a persistent connection into the
database and constantly executes number of stored functions. Sometimes
I need to modify the implementation of those functions to change the
data layout, but doing that results in errors like this:

unrecognized node type: 1852387187

This report is far too vague to give a useful reply to.
What exactly do you mean by "modify the implementation"?

regards, tom lane

#4Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Alex Vinogradovs (#3)
Re: Concurrent modification of plpgsql function body

Alex Vinogradovs wrote:

I mean I re-create the function with the same signature but
different body, and when the application invokes that function
again, it starts getting those errors.

Are you using CREATE OR REPLACE FUNCTION, or DROP FUNCTION followed by
CREATE FUNCTION?

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

#5Alex Vinogradovs
AVinogradovs@Clearpathnet.com
In reply to: Alvaro Herrera (#4)
Re: Concurrent modification of plpgsql function body

Yes, I'm using CREATE OR REPLACE.

Alex.

Show quoted text

On Mon, 2008-01-07 at 16:17 -0300, Alvaro Herrera wrote:

Alex Vinogradovs wrote:

I mean I re-create the function with the same signature but
different body, and when the application invokes that function
again, it starts getting those errors.

Are you using CREATE OR REPLACE FUNCTION, or DROP FUNCTION followed by
CREATE FUNCTION?

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#4)
Re: Concurrent modification of plpgsql function body

Alvaro Herrera <alvherre@commandprompt.com> writes:

Alex Vinogradovs wrote:

I mean I re-create the function with the same signature but
different body, and when the application invokes that function
again, it starts getting those errors.

Are you using CREATE OR REPLACE FUNCTION, or DROP FUNCTION followed by
CREATE FUNCTION?

Perhaps more to the point, we need to see a complete example. I don't
see how either way of changing a plpgsql function would result in the
described error.

regards, tom lane