RE: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently - Mailing list pgsql-hackers

From tsunakawa.takay@fujitsu.com
Subject RE: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently
Date
Msg-id TYAPR01MB299039FBFEE1D23CEF2BF828FEDB0@TYAPR01MB2990.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [bug fix] ALTER TABLE SET LOGGED/UNLOGGED on a partitioned table does nothing silently
List pgsql-hackers
From: Michael Paquier <michael@paquier.xyz>
> On Wed, Dec 09, 2020 at 09:52:17AM -0300, Alvaro Herrera wrote:
> > Well, that definition seems unfriendly to me.  I prefer the stance
> > that if you change the value for the parent, then future partitions
> > inherit that value.
>
> That's indeed more interesting from the user perspective.  So +1 from me.

As I mentioned as below, some properties apply to that, and some don't.

--------------------------------------------------
That would be right when the storage property is an optional specification such as fillfactor.  For example, when I run
ALTERTABLE mytable SET (fillfactor = 70) and then CREATE TABLE mytable_p1 PARTITION OF mytable, I find it nice that the
fillfactoros mytable_p1 is also 70 (but I won't complain if it isn't, since I can run ALTER TABLE SET on the parent
tableagain.) 

OTOH, CREATE TABLE and CREATE UNLOGGED TABLE is an explicit request to create a logged and unlogged relation
respectively. I feel it a strange? if CREATE TABLE mytable_p1 PARTITION OF mytable creates an unlogged partition. 
--------------------------------------------------


Anyway, I think I'll group ALTER TABLE/INDEX altering actions based on some common factors and suggest what would be a
desirablebehavior, asking for opinions.  I'd like to explore the consensus on the basic policy for fixes.  Then, I hope
wewill be able to work on fixes for each ALTER action in patches that can be released separately.  I'd like to regist
requiringall fixes to be arranged at once, since that may become a high bar for those who volunteer to fix some of the
actions. (Even a committer Alvaro-san struggled to fix one action, ALTER TABLE REPLICA IDENTITY.) 


Regards
Takayuki Tsunakawa





pgsql-hackers by date:

Previous
From: Zhihong Yu
Date:
Subject: Re: SQL/JSON: functions
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: schema variables