Re: Declarative partitioning - another take

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Maksim Milyutin <m(dot)milyutin(at)postgrespro(dot)ru>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Erik Rijkers <er(at)xs4all(dot)nl>, Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers-owner(at)postgresql(dot)org
Subject: Re: Declarative partitioning - another take
Date: 2016-12-13 15:44:13
Message-ID: CA+Tgmobq6MzGpw_pxDsQHw4UGPX7NxuhUZ_BfTzTEz-Og-iYog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 9, 2016 at 5:46 AM, Maksim Milyutin
<m(dot)milyutin(at)postgrespro(dot)ru> wrote:
> I would like to work on two tasks:
> - insert (and eventually update) tuple routing for foreign partition.
> - the ability to create an index on the parent and have all of the children
> inherit it;
>
> The first one has been implemented in pg_pathman somehow, but the code
> relies on dirty hacks, so the FDW API has to be improved. As for the
> extended index support, it doesn't look like a super-hard task.

Great!

I think that the second one will be fairly tricky. You will need some
way of linking the child indexes back to the parent index. And then
you will need to prohibit them from being dropped or modified
independent of the parent index. And you will need to cascade ALTER
commands on the parent index (which will have no real storage, I hope)
down to the children. Unfortunately, index names have to be unique on
a schema-wide basis, so we'll somehow need to generate names for the
"child" indexes. But those names might collide with existing objects,
and will need to be preserved across a dump-and-restore. The concept
is simple but getting all of the details right is hard.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-12-13 15:46:02 Re: [PATCH] Fix for documentation of timestamp type
Previous Message Tom Lane 2016-12-13 15:41:24 Re: [PATCH] Fix for documentation of timestamp type