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

From Tom Lane
Subject Re: PL/pgSQL bug?
Date
Msg-id 17649.997583255@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/pgSQL bug?  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> According to the doc, tuples with cmax > 0 should not be visible to
> the current transaction, no?

The docs are wrong --- my mistake originally, and in fact I just fixed
it in current sources.  cmax != 0 only indicates that someone tried to
delete the tuple; not that the someone ever committed, much less that
their commit should be visible to you under MVCC rules.  (Also, I
believe the command counter starts at 0, so this test would only catch
deletes that weren't the first command in their transaction, anyway.
Testing xmax != 0 would avoid that issue, but not the fundamental
problem of commit status.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: [PATCHES] Select parser at runtime
Next
From: Darren Johnson
Date:
Subject: Re: Comparing tables in different db's