Re: CREATE TABLE ( .. STORAGE ..) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: CREATE TABLE ( .. STORAGE ..)
Date
Msg-id 46546823-5b6c-4aeb-43b8-d4db48d4a606@enterprisedb.com
Whole thread Raw
In response to Re: CREATE TABLE ( .. STORAGE ..)  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: CREATE TABLE ( .. STORAGE ..)
List pgsql-hackers
On 12.07.22 12:10, Aleksander Alekseev wrote:
> Hi Peter,
> 
>> The "safety check: do not allow toasted storage modes unless column
>> datatype is TOAST-aware" could be moved into GetAttributeStorage(), so
>> it doesn't have to be repeated.  (Note that GetAttributeCompression()
>> does similar checking.)
> 
> Good point. Fixed.
> 
>> ATExecSetStorage() currently doesn't do any such check, and your patch
>> isn't adding one.  Is there a reason for that?
> 
> ATExecSetStorage() does this, but the check is a bit below [1]. In v7
> I moved the check to GetAttributeStorage() as well.
> 
> [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/commands/tablecmds.c#l8312

Committed.

I thought the removal of the documentation details of SET COMPRESSION 
and SET STORAGE from the ALTER TABLE ref page was a bit excessive, since 
that material actually contained useful information about what happens 
when you change compression or storage on a table with existing data. 
So I left that in.  Maybe there is room to deduplicate that material a 
bit, but it would need to be more fine-grained than just removing one 
side of it.




pgsql-hackers by date:

Previous
From: Przemysław Sztoch
Date:
Subject: Re: [PATCH] Completed unaccent dictionary with many missing characters
Next
From: Aleksander Alekseev
Date:
Subject: Re: CREATE TABLE ( .. STORAGE ..)