Re: ALTER TABLE ... SET STORAGE does not propagate to indexes

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER TABLE ... SET STORAGE does not propagate to indexes
Date: 2020-05-06 14:37:55
Message-ID: 1e19aeb2-c300-a8a0-e828-9090671eb428@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-04-22 16:26, Peter Eisentraut wrote:
> On 2020-04-22 01:56, Alvaro Herrera wrote:
>> I'm surprised that this hasn't applied yet, because:
>>
>> On 2020-Apr-09, Peter Eisentraut wrote:
>>
>>> One thing to remember is that the current situation is broken. While you
>>> can set index columns to have different storage than the corresponding table
>>> columns, pg_dump does not preserve that, because it dumps indexes after
>>> ALTER TABLE commands. So at the moment, having these two things different
>>> isn't really supported.
>>
>> So I have to ask -- are you planning to get this patch pushed and
>> backpatched?
>
> I think I should, but I figured I want to give some extra time for
> people to consider the horror that I created in the test_decoding tests.

OK then, if there are no last-minute objects, I'll commit this for the
upcoming minor releases.

This is the patch summary again:

Date: Thu, 9 Apr 2020 14:10:01 +0200
Subject: [PATCH v3] Propagate ALTER TABLE ... SET STORAGE to indexes

When creating a new index, the attstorage setting of the table column
is copied to regular (non-expression) index columns. But a later
ALTER TABLE ... SET STORAGE is not propagated to indexes, thus
creating an inconsistent and undumpable state.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-05-06 15:06:33 Re: PG 13 release notes, first draft
Previous Message Peter Eisentraut 2020-05-06 14:29:31 Re: Dumping/restoring fails on inherited generated column