Re: Batch update of indexes

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: David Steele <david(at)pgmasters(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Batch update of indexes
Date: 2016-03-14 14:28:44
Message-ID: 56E6CA9C.9070006@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi David,

Rebased patch is attached.

On 14.03.2016 15:09, David Steele wrote:
> Hi Konstantin,
>
> On 2/3/16 11:47 AM, Konstantin Knizhnik wrote:
>> Attached please find patch for "ALTER INDEX ... WHERE ..." clause.
>> It is now able to handle all three possible situations:
>> 1. Making index partial (add WHERE condition to the ordinary index)
>> 2. Extend partial index range (less restricted index predicate)
>> 3. Arbitrary change of partial index predicate
>>
>> In case 2) new records are added to the index.
>> In other two cases index is completely reconstructed.
>>
>> This patch includes src/bin/insbench utility for testing insert
>> performance. It can be easily excluded from the patch to reduce it size.
>> Also it is better to apply this patch together with "index-only scans
>> with partial indexes" patch:
>
> This patch no longer applies on master:
>
> $ git apply ../other/alter-index.patch
> ../other/alter-index.patch:27: trailing whitespace.
> static void
> ../other/alter-index.patch:62: indent with spaces.
> SPIPlanPtr plan;
> ../other/alter-index.patch:63: indent with spaces.
> Portal portal;
> ../other/alter-index.patch:90: trailing whitespace.
>
> ../other/alter-index.patch:99: trailing whitespace.
>
> error: patch failed: src/test/regress/expected/aggregates.out:831
> error: src/test/regress/expected/aggregates.out: patch does not apply
>
> Please provide a new patch for review. Meanwhile I am marking this
> "waiting on author".
>
> Thanks,

--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
alter-index.patch text/x-patch 30.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2016-03-14 14:37:56 Re: Batch update of indexes
Previous Message Joe Conway 2016-03-14 14:15:30 Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types