Re: PL/pgSQL bug? - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject Re: PL/pgSQL bug?
Date
Msg-id 3B7806BF.7FD6D7B9@tpf.co.jp
Whole thread Raw
In response to Re: PL/pgSQL bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > It's possible for a function to use a unique snapshot
> > if there are only SELECT statements in the function
> > but it's impossible if there are UPDATE/DELETE or
> > SELECT .. FOR UPDATE statements etc.
> 
> You are confusing

No.

> snapshots (which determine visibility of the results
> of OTHER transactions)

Yes.

> with command-counter incrementing (which
> determines visibility of the results of OUR OWN transaction).

Yes.  

> I agree
> that plpgsql's handling of command-counter changes is broken,

Probably yes but

> but it
> does not follow that sprinkling the code with SetQuerySnapshot is wise.
> 

Should both command counter and snapshots be changed
properly ? Please explain me why/how we could do with
no snapshot change in read committed mode.

regards,
Hiroshi Inoue


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Surviving transaction-ID wraparound, take 2
Next
From: Tom Lane
Date:
Subject: Re: Rename config.h to pg_config.h?