Re: propagating replica identity to partitions

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: propagating replica identity to partitions
Дата
Msg-id 806fd173-9084-5fb8-ed78-25398ab9e92f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: propagating replica identity to partitions  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: propagating replica identity to partitions
Re: propagating replica identity to partitions
Список pgsql-hackers
On 2019-03-22 17:52, Alvaro Herrera wrote:
> To recap: my proposed change is to make
>     ALTER TABLE ... REPLICA IDENTITY
> when applied on a partitioned table affect all of its partitions instead
> of expecting the user to invoke the command for each partition.

If you are operating on a partitioned table and set the replica identity
to the primary key or a partitioned index of that partitioned table,
then I think, by definition of what it means to be a partitioned index,
that applies to the whole partition hierarchy.

Aside from that theoretical consideration, what would be the practical
use of not doing that?

> At the
> same time, I am proposing not to change to have recursive behavior other
> forms of ALTER TABLE in one commit, such as TABLESPACE and OWNER TO,
> which currently do not have recursive behavior.

I'm slightly baffled that we would even allow having different owners on
different partitions, but that seems to be a separate discussion.

In general, it seems sensible that if you operate on a partitioned
table, the whole partition hierarchy is affected unless told otherwise.
There may be sensible exceptions, but it seems useful as the default.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: shared-memory based stats collector
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Introduce MIN/MAX aggregate functions to pg_lsn