Re: Function Comit - Mailing list pgsql-novice

From Josh Berkus
Subject Re: Function Comit
Date
Msg-id web-2872813@davinci.ethosmedia.com
Whole thread Raw
In response to Re: Function Comit  (Aspire Something <sank89@sancharnet.in>)
Responses Re: Function Comit
List pgsql-novice
Aspire,

> While we are working in the function func_1()
> It calls func_2() and data reproduced is accesed by func_3()
>
> diagramaticlly it is something like this
>
>                               _____________________func_1()
>                               |
>                               |___ func_2()_____
>                               |                             |
>                               |_______________|__func_3()
>                               |
>                               |
>                                 end of func_1)
>
> Here is the catch since func_1()'s block is not finisied any data
> will not
> be reflected / commited  in the database
> untill succesfull completion of the func_1()

But it is supposed to be visible.  Function2() and Function3() are
child transactions of Function1().   As such, any changes made be
Function1() ro Function2() should be visible to Function3(), even
though they are not visible to any other connection until Function1()
commits.  That's how MVCC works.

However, there have been some problems with this visibility issue in
long-running PL/pgSQL functions before.  So I'd like to see if you've
discovered a new problem; if I can reproduce it, I'll post it to BUGS.

-Josh

pgsql-novice by date:

Previous
From: Aarni Ruuhimäki
Date:
Subject: Re: usage on blobs
Next
From: Tom Lane
Date:
Subject: Re: Function Comit