Re: Tuple visibility within a single XID

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tuple visibility within a single XID
Date: 2015-04-08 14:02:35
Message-ID: 4903.1428501755@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Qingqing Zhou <zhouqq(dot)postgres(at)gmail(dot)com> writes:
> Not sure if I understand correctly: in uniqueness check, we see all
> possible tuples with a dirty snapshot. For a tuple version inserted
> and updated by myself, it is surely dead no matter how the transaction
> ends. So I interpret that we can safely pruning the version.

It may be dead in the future, but unless you can prove that your session
does not still contain a snapshot that could "see" the row, you can't
prune it. Considering only the current query is a fundamental error.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-04-08 14:07:41 Re: Row security violation error is misleading
Previous Message Sawada Masahiko 2015-04-08 13:53:59 Re: Proposal : REINDEX xxx VERBOSE