Re: [HACKERS] Declarative partitioning - another take - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Declarative partitioning - another take
Date
Msg-id CA+Tgmobq6MzGpw_pxDsQHw4UGPX7NxuhUZ_BfTzTEz-Og-iYog@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Declarative partitioning - another take  (Maksim Milyutin <m.milyutin@postgrespro.ru>)
List pgsql-hackers
On Fri, Dec 9, 2016 at 5:46 AM, Maksim Milyutin
<m.milyutin@postgrespro.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [PATCH] Fix for documentation of timestamp type
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH] Fix for documentation of timestamp type