Re: Local parent table and Foreign table(s) as partition(s), is it possible? - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Local parent table and Foreign table(s) as partition(s), is it possible?
Date
Msg-id 5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at
Whole thread Raw
In response to Re: Local parent table and Foreign table(s) as partition(s), is it possible?  (Sbob <sbob@quadratum-braccas.com>)
List pgsql-admin
On Wed, 2022-09-14 at 12:17 -0600, Sbob wrote:
> 
> On 9/14/22 12:01, Laurenz Albe wrote:
> > On Wed, 2022-09-14 at 11:41 -0600, Sbob wrote:
> > > I see the below options in the CREATE FOREIGN TABLE, however I assume these would both connect
> > > to a master/parent table on the foreign server. Is it possible to have a Foreign Table that
> > > acts as a partition of a local parent table, via either method (INHERITS or PARTITION OF)?
> > Yes, exactly: a foreign table can be a partition of a local partitioned table.
> > This can be used to implement sharding, if the foreign data wrapper supports the "parallel append"
> > node introduced in PostgreSQL v14.
> 
> Nice!  so do I simply use the INHERITS clause or the PARTITION OF clause 
> when I create the foreign table and reference the local parent table?

Precisely.  Use declarative partitioning rather than inheritance.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



pgsql-admin by date:

Previous
From: Sylvain Deveaux
Date:
Subject: Ldap config for Active Directory
Next
From: Stephen Frost
Date:
Subject: Re: Ldap config for Active Directory