From: | Keith Fiske <keith(dot)fiske(at)crunchydata(dot)com> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | ejberdecia(at)yahoo(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #15954: Unable to alter partitioned table to set logged |
Date: | 2019-08-14 03:35:17 |
Message-ID: | CAODZiv7ptJ00yegZHW+F5ZgEubX=wTA4JRtWW27TqQyGkN9wwA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Aug 13, 2019 at 9:47 PM Amit Langote <amitlangote09(at)gmail(dot)com>
wrote:
> On Wed, Aug 14, 2019 at 3:06 AM PG Bug reporting form
> <noreply(at)postgresql(dot)org> wrote:
> > The following bug has been logged on the website:
> >
> > Bug reference: 15954
> > Logged by: Efrain Berdecia
> > Email address: ejberdecia(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Fiske | 2019-08-14 03:41:46 | Re: BUG #15954: Unable to alter partitioned table to set logged |
Previous Message | Efrain J. Berdecia | 2019-08-14 03:32:50 | Re: BUG #15954: Unable to alter partitioned table to set logged |