Re: Further open item (Was: Status of 7.2) - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Further open item (Was: Status of 7.2)
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB420@m0114.s-mxs.net
Whole thread Raw
In response to Further open item (Was: Status of 7.2)  ("Tille, Andreas" <TilleA@rki.de>)
List pgsql-hackers
> >>The underlying problem the user is seeing is how to _know_ an index
> >>tuple is valid without checking the heap,
> >>
> I'd propose a memory-only (or heavily cached) structure of tuple death
transaction
> ids for all transactions since the oldest live trx. And when that
oldest finishes then
> the tombstone marks for all tuples deleted between that and the new
oldest are moved to 
> relevant indexes (or the index keys are deleted) by concurrent vacuum
> or similar process.

Andreas said, that his data is only loaded/changed in the night, thus
for his queries all tuples found in the index are actually live.
Every heap tuple lookup results in "tuple valid".

In his case a per table global "highest xid" in heapdata that can be
compared
against highest xid during last vacuum would probably be sufficient
(or a flag for "modified after last vacuum").
Of course per table globals are a major headache regarding concurrency,
but there would be other possible optimizations that could profit from
such 
a structure, like rowcount ...

Andreas


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: 7.2b2 "make check" failure on Red Hat Linux 7.2
Next
From: Tom Lane
Date:
Subject: Re: Further open item (Was: Status of 7.2)