Re: Inheriting table AMs for partitioned tables - Mailing list pgsql-hackers

From David Rowley
Subject Re: Inheriting table AMs for partitioned tables
Date
Msg-id CAKJS1f9oxE=tSBiGvFRgUPuSmiVrF1FEkhs9WSWTU6Eahb9UpA@mail.gmail.com
Whole thread Raw
In response to Inheriting table AMs for partitioned tables  (Andres Freund <andres@anarazel.de>)
Responses Re: Inheriting table AMs for partitioned tables
Re: Inheriting table AMs for partitioned tables
List pgsql-hackers
On Tue, 5 Mar 2019 at 12:47, Andres Freund <andres@anarazel.de> wrote:
> CREATE TABLE tableam_parted_heap2 (a text, b int) PARTITION BY list (a) USING heap2;
>
> SET default_table_access_method = 'heap';
> CREATE TABLE tableam_parted_a_heap2 PARTITION OF tableam_parted_heap2 FOR VALUES IN ('a');


> But for tableam_parted_a_heap2 tableam_parted_b_heap2 the answer isn't
> quite as clear.  I think it'd both be sensible for new partitions to
> inherit the AM from the root, but it'd also be sensible to use the
> current default.

I'd suggest it's made to work the same way as ca4103025dfe26 made
tablespaces work.  i.e. if they specify the storage type when creating
the partition, then always use that, unless they mention otherwise. If
nothing was mentioned when they created the partition, then use
default_table_access_method.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Inheriting table AMs for partitioned tables
Next
From: David Rowley
Date:
Subject: Re: Inheriting table AMs for partitioned tables