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

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: BUG #15954: Unable to alter partitioned table to set logged
Дата
Msg-id 20190822.171439.14634665.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15954: Unable to alter partitioned table to set logged  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: BUG #15954: Unable to alter partitioned table to set logged  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
At Wed, 21 Aug 2019 22:44:34 +0900, Michael Paquier <michael@paquier.xyz> wrote in <20190821134434.GA9383@paquier.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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Petar Masev
Дата:
Сообщение: RE: Postgres 11.5.1 failed installation
Следующее
От: Keith Fiske
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged