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

Поиск
Список
Период
Сортировка
От Keith Fiske
Тема Re: BUG #15954: Unable to alter partitioned table to set logged
Дата
Msg-id CAODZiv7ptJ00yegZHW+F5ZgEubX=wTA4JRtWW27TqQyGkN9wwA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15954: Unable to alter partitioned table to set logged  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-bugs


On Tue, Aug 13, 2019 at 9:47 PM Amit Langote <amitlangote09@gmail.com> wrote:
On Wed, Aug 14, 2019 at 3:06 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      15954
> Logged by:          Efrain Berdecia
> Email address:      ejberdecia@yahoo.com
> PostgreSQL version: 11.1
> Operating system:   Centos7
> Description:
>
> I have a partition table that I created unlogged. I'm using pg_partman to
> manage the partition. I then proceeded to load data into it with a COPY
> command.
>
> Afterwards, I ran an alter table set logged on the parent table but the
> table still shows as UNLOGGED along with all its children.
>
> Is this broken?

It is somewhat.  A workaround is to perform ALTER TABLE SET LOGGED
individually on each partition.  Specifying LOGGED / UNLOGGED for the
parent table is useless as things stand now.

Are you sure by the way that the individual partitions are themselves
UNLOGGED when you created them?  Partitions don't inherit the
logged-ness property from the parent table, so you must explicitly
create a partition using CREATE UNLOGGED TABLE ... PARTITION OF ... if
you want it to be unlogged.

Thanks,
Amit



This is a feature of pg_partman itself and was implemented before native partitioning. I check the UNLOGGED status of the parent and set the children appropriately with explicit statements as you say here..


--
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

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

Предыдущее
От: "Efrain J. Berdecia"
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged
Следующее
От: Keith Fiske
Дата:
Сообщение: Re: BUG #15954: Unable to alter partitioned table to set logged