Re: [HACKERS] Indexing dead tuples

2005-08-31 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > On Wed, 2005-08-31 at 19:06 -0400, Tom Lane wrote: >> In fact, it had better be able to, since once the CREATE INDEX commits, >> pre-existing xacts are responsible to insert index entries for anything >> they insert into the table. > So would it be possibl

Re: [HACKERS] Indexing dead tuples

2005-08-31 Thread Simon Riggs
On Wed, 2005-08-31 at 19:06 -0400, Tom Lane wrote: > Andrew - Supernews <[EMAIL PROTECTED]> writes: > > On 2005-08-31, Simon Riggs <[EMAIL PROTECTED]> wrote: > >> During CREATE INDEX we include all tuples, even if they are already dead > >> when we build an index. > >> > >> What purpose does this

Re: [HACKERS] Indexing dead tuples

2005-08-31 Thread Tom Lane
Andrew - Supernews <[EMAIL PROTECTED]> writes: > On 2005-08-31, Simon Riggs <[EMAIL PROTECTED]> wrote: >> During CREATE INDEX we include all tuples, even if they are already dead >> when we build an index. >> >> What purpose does this serve? >> >> A pre-existing transaction can't see the index,

Re: [HACKERS] Indexing dead tuples

2005-08-31 Thread Andrew - Supernews
On 2005-08-31, Simon Riggs <[EMAIL PROTECTED]> wrote: > During CREATE INDEX we include all tuples, even if they are already dead > when we build an index. > > What purpose does this serve? > > A pre-existing transaction can't see the index, Yes, it can; the catalog is read in SnapshotNow rather th

[HACKERS] Indexing dead tuples

2005-08-31 Thread Simon Riggs
During CREATE INDEX we include all tuples, even if they are already dead when we build an index. What purpose does this serve? A pre-existing transaction can't see the index, so there is no danger that it can use the index and unknowingly avoid touching a valid row. (If it *can* see the index, is