Re: OID Usage

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Bo Lorentsen <bl(at)netgroup(dot)dk>, "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: OID Usage
Date: 2005-01-15 21:18:42
Message-ID: 20050115211842.GQ67721@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Jan 15, 2005 at 04:00:19PM -0500, Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> > On Sat, Jan 15, 2005 at 07:10:48PM +0100, Bo Lorentsen wrote:
> >> Hmm, so a data row update also update the CTID in all indexes, too. I=20
> >> see what you mean !
>
> > Not quite, a single index entry needs to point to any number of rows,
> > which may or may not be visible depending on your transaction, so they
> > form a sort of linked list.
>
> No, an index entry contains just one CTID. An update makes a new
> version of the row (stored at a new CTID location) and also makes new
> index entries pointing at that CTID. In the general case this must be
> so, since the new version might well contain different values for the
> indexed fields; but we do not try to optimize the case where the indexed
> field didn't change.

Out of curiosity, what clears out the old index tuples? Vacuum?
--
Jim C. Nasby, Database Consultant decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-01-15 21:21:24 Re: OID Usage
Previous Message Jim C. Nasby 2005-01-15 21:11:22 Re: Index optimization ?