Skip site navigation (1) Skip section navigation (2)

Re: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?
Date: 2007-03-01 06:06:04
Message-ID: 15991.1172729164@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu> writes:
> Would it be acceptable?

No, because you can't create index entries when you haven't yet got the
TID for the heap tuple.  What do you propose doing, insert a dummy index
entry and then go back to fill it in later?  Aside from approximately
doubling the work involved, this is fundamentally broken because no
other backend could know what to do upon encountering the dummy index
entry --- there's no way for it to check if the entry references a live
tuple or not.  Not to mention that a crash here will leave a permanently
dummy index entry that there's no way to vacuum.

The other rearrangements you suggest are not any more acceptable;
we are not going to restructure the entire handling of defaults and
check constraints around a single badly-designed SQL2003 feature.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Denis LussierDate: 2007-03-01 06:08:46
Subject: Re: Packed short varlenas, what next?
Previous:From: Josh BerkusDate: 2007-03-01 06:05:50
Subject: Re: POSTGRES WAL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group