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