Re: Batch update of indexes - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Batch update of indexes
Date
Msg-id 56B286A7.9030904@BlueTreble.com
Whole thread Raw
In response to Re: Batch update of indexes  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Batch update of indexes
List pgsql-hackers
On 1/21/16 11:47 AM, Konstantin Knizhnik wrote:
>> BTW, could you explain, what is the reason to copy data into the
>> pending list and then copy it again while flushing pending list into
>> the index? Why not read this data directly from the table? I feel that
>> I've missed something important here.
>>
> No, I do  not think that inserted data should be placed in pending list
> and then copied to main table.
> It should be stored directly in the main table and "pending list" is
> just some fast, transient index.

That sounds similar to what we would need to support referencing OLD and 
NEW in per-statement triggers: a good way to find everything that was 
changed in a statement.

Or if you will, s/statement/transaction/.

Having that is probably a prerequisite for doing incremental refresh 
materialized views.

My suspicion is that it would be useful to pre-order the new data before 
trying to apply it to the indexes.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: postgres_fdw join pushdown (was Re: Custom/Foreign-Join-APIs)
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Idle In Transaction Session Timeout, revived