Re: Inheriting table AMs for partitioned tables

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Inheriting table AMs for partitioned tables
Date: 2019-03-05 03:01:50
Message-ID: CAKJS1f9oxE=tSBiGvFRgUPuSmiVrF1FEkhs9WSWTU6Eahb9UpA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 5 Mar 2019 at 12:47, Andres Freund <andres(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2019-03-05 03:03:46 Re: Inheriting table AMs for partitioned tables
Previous Message Amit Langote 2019-03-05 02:59:07 Re: Inheriting table AMs for partitioned tables