Re: Why to index a "Recently DEAD" tuple when creating index - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why to index a "Recently DEAD" tuple when creating index
Date
Msg-id 9250.1560167817@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why to index a "Recently DEAD" tuple when creating index  (Kuntal Ghosh <kuntalghosh.2007@gmail.com>)
Responses Re: Why to index a "Recently DEAD" tuple when creating index
List pgsql-hackers
Kuntal Ghosh <kuntalghosh.2007@gmail.com> writes:
>> 2.   If we only support "Read Committed" isolation level,  is there a safe way to not index such data?

> I can't think of a case where the RECENTLY_DELETED tuple needs to be
> indexed in "Read Committed" case.

I think you're making dangerously optimistic assumptions about how
long a query snapshot might survive in READ COMMITTED mode.

In particular, I suspect you're reasoning that the new index couldn't
be used except by a freshly-created query plan, which is possibly
true, and that such a plan must be used with a freshly-created
snapshot, which is simply wrong.  A counterexample could be built
using a SQL or PL function that's marked STABLE, because such a
function is defined to be executed using the calling query's
snapshot.  But it'll make query plans using current reality.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Binary support for pgoutput plugin
Next
From: Daniel Gustafsson
Date:
Subject: Re: GiST limits on contrib/cube with dimension > 100?