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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #15954: Unable to alter partitioned table to set logged
Дата
Msg-id ZidJNJzvnDVLsgtB@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #15954: Unable to alter partitioned table to set logged  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: BUG #15954: Unable to alter partitioned table to set logged  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
On Mon, Apr 22, 2024 at 12:36:20PM -0700, David G. Johnston wrote:
> There is little upside to preventing the existence of an unlogged
> partitioned table at this point.  I have just submitted a doc patch to deal
> with that side of the equation.

I would not object to that.  However, now that we're five years into
this problem, I'd rather treat that as a new entire feature than
change the existing behavior in the back branches.

Not changing unlogged property of a partitioned table on ALTER TABLE
is of course no good.  However, we also ignore the fact that a
partitioned table is unlogged when we create its partitions, and there
is a point in making partitions inherit this property from the parent.
So, my take would be:
- To switch the relpersistence of a partitioned table on ALTER TABLE,
without touching any of its partitions.
- New partitions should inherit the unlogged property of the parent.
- pg_dump should not need tweaks to be able to cope with that, as
loggedness is part of the CREATE queries.

Compared to the recent experiences around tablespaces and table AMs,
this should be less complicated with code paths for relations without
storage in tablecmds.c.
--
Michael

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: BUG #18442: Unnecessary Sort operator in indexScan Plan
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #18146: Rows reappearing in Tables after Auto-Vacuum Failure in PostgreSQL on Windows