Re: BUG #15954: Unable to alter partitioned table to set logged

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: michael(at)paquier(dot)xyz
Cc: keith(dot)fiske(at)crunchydata(dot)com, ejberdecia(at)yahoo(dot)com, david(dot)rowley(at)2ndquadrant(dot)com, amitlangote09(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15954: Unable to alter partitioned table to set logged
Date: 2019-08-22 08:14:39
Message-ID: 20190822.171439.14634665.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

At Wed, 21 Aug 2019 22:44:34 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in <20190821134434(dot)GA9383(at)paquier(dot)xyz>
> On Wed, Aug 21, 2019 at 09:24:38AM -0400, Keith Fiske wrote:
> > As the others have stated, I think we just need to get some sort of
> > consistent method of handling this. Currently running an ALTER TABLE on the
> > parent to change the UNLOGGED state simply does nothing which is not
> > intuitive whatsoever. Even if it's just throwing an error saying you cannot
> > change this property, that would be better until a more thorough solution
> > can be implemented in the future.
>
> One problem with an error is that it may break existing application
> code :(

It is quite strange that we can CREATE both LOGGED and UNLOGGED
partitioned table but cannot ALTER the property. I believe no one
does ALTER TABLE SET (UN)LOGGED expecting it is silently ignored.

But I'm not sure about the CREATE case.. CREATE UNLOGGED VIEW is
complained as "cannot be unlogged bacause they do not have
storage" but I don't think partitioned tables don't necessarily
need to behave so. Even if any, I'm not sure what those who does
"CREATE UNLOGGED TABLE parent" expect (*), I think we can ignore
and always make the new table as LOGGED. The only trouble case is
happen only for those who checks the property.

*: Maybe they expect that the property propagates to children,
but anyway we are not doing so.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Keith Fiske 2019-08-22 14:37:20 Re: BUG #15954: Unable to alter partitioned table to set logged
Previous Message Petar Masev 2019-08-22 08:02:06 RE: Postgres 11.5.1 failed installation