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

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

From: Zoltan Boszormenyi <zboszor(at)dunaweb(dot)hu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to run heap_insert() AFTER ExecInsertIndexTuples() ?
Date: 2007-03-01 13:50:30
Message-ID: 45E6DA26.6030309@dunaweb.hu (view raw or flat)
Thread:
Lists: pgsql-hackers
Zoltan Boszormenyi írta:
>> The cost I am thinking now is an extra heap_update()
>> after heap_insert() without generating the identity value
>> and inserting index tuples to indexes that doesn't
>> contain the identity column.
>
> And as far as I tested the current state, there is no cost
> if you don't use GENERATED or IDENTITY.
> The extra heap_update() would be performed only
> if you have an IDENTITY colum.

The modification I imagined is actually working:
- skip indexes using the identity columns
- do a simple_heap_update() after all other columns are
  assigned and index tuples are inserted
- do ExecInsertIndexTuples() on indexes referencing
  the IDENTITY column

However, I get warning messages like:

WARNING:  detected write past chunk end in ExecutorState 0xaaff68

How can I prevent them?

Best regards,
Zoltán Böszörményi


In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2007-03-01 13:51:43
Subject: Re: COMMIT NOWAIT Performance Option
Previous:From: Magnus HaganderDate: 2007-03-01 13:50:10
Subject: Re: [HACKERS] urgent: upgraded to 8.2, getting kernel panics

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