pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Sbob <sbob@quadratum-braccas.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Local parent table and Foreign table(s) as partition(s), is it possible?
Date: Thu, 15 Sep 2022 10:18:33 +0200
Message-ID: <5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at> (raw)
In-Reply-To: <7e2b6998-d62c-0460-066d-dce9f238e5af@quadratum-braccas.com>
References: <25206e71-b388-3c51-ce17-5fd0912398eb@quadratum-braccas.com>
	<ba39412beb6b079a01fb3898a0b5e7eef01f084d.camel@cybertec.at>
	<7e2b6998-d62c-0460-066d-dce9f238e5af@quadratum-braccas.com>

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





view thread (4+ messages)

Message-ID: <5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at>
Permalink:  ../5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at/
Also on:    postgresql.org/message-id/5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, sbob@quadratum-braccas.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Local parent table and Foreign table(s) as partition(s), is it possible?
  In-Reply-To: <5de6ad47c3a59ea83e267707771823f03e271e1d.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox