Re: Much Ado About COUNT(*)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Jonah H(dot) Harris" <jharris(at)tvi(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Much Ado About COUNT(*)
Date: 2005-01-13 04:54:52
Message-ID: 5213.1105592092@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> My basic idea was to keep a status bit on each index entry telling it if
> a previous backend looked at the heap and determined it was valid.

Even if you could track the tuple's committed-good status reliably, that
isn't enough under MVCC. The tuple might be committed good, and seen
that way by some other backend that set the bit, and yet it's not supposed
to be visible to your older transaction. Or the reverse at tuple
deletion.

regards, tom lane

In response to

Responses

Browse pgsql-announce by date

  From Date Subject
Next Message Bruce Momjian 2005-01-13 04:57:56 Re: Much Ado About COUNT(*)
Previous Message Bruce Momjian 2005-01-13 04:15:58 Re: Much Ado About COUNT(*)

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-01-13 04:57:56 Re: Much Ado About COUNT(*)
Previous Message Bruce Momjian 2005-01-13 04:15:58 Re: Much Ado About COUNT(*)

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-01-13 04:57:56 Re: Much Ado About COUNT(*)
Previous Message Bruce Momjian 2005-01-13 04:15:58 Re: Much Ado About COUNT(*)