Re: Function Comit

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: Aspire Something <aspire420(at)hotpop(dot)com>, pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Function Comit
Date: 2003-02-27 21:44:25
Message-ID: web-2872813@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-02-27 22:46:24 Re: Function Comit
Previous Message Aarni Ruuhimäki 2003-02-27 21:39:48 Re: usage on blobs