Re: CREATE INDEX and HOT - revised design

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Pavan Deolasee" <pavan(dot)deolasee(at)gmail(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Pavan Deolasee" <pavan(dot)deolasee(at)enterprisedb(dot)com>
Subject: Re: CREATE INDEX and HOT - revised design
Date: 2007-03-22 20:16:12
Message-ID: 26344.1174594572@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> There is a slight hole in that SERIALIZABLE transactions won't be able
> to use any indexes they build during their transaction, since they may
> need to be able to see prior data, but I don't think anybody is going to
> complain about that restriction. Anyone?

Practically every statement I've seen in this thread that used the
phrase "SERIALIZABLE transaction" was wrong to some extent, and this
one is no different.

The issue is not whether the whole transaction is serializable or not,
it's how old is the oldest still-live snapshot, a thing that CREATE
INDEX can't tell with any certainty in READ COMMITTED mode. So if your
solution involves any explicit dependence on the transaction
serializability mode, it's probably wrong. I'm not totally sure if you
are expecting to be able to tell that, but I do know that the planner
has no idea what snapshots a plan it makes will be used with.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-03-22 20:16:16 Re: [PATCHES] xml2 contrib patch supporting default XML namespaces
Previous Message Bruce Momjian 2007-03-22 20:15:24 Re: xpath_array with namespaces support