Re: Local parent table and Foreign table(s) as partition(s), is it possible?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Sbob <sbob(at)quadratum-braccas(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Local parent table and Foreign table(s) as partition(s), is it possible?
Date: 2022-09-14 18:01:11
Message-ID: ba39412beb6b079a01fb3898a0b5e7eef01f084d.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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.

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sbob 2022-09-14 18:17:34 Re: Local parent table and Foreign table(s) as partition(s), is it possible?
Previous Message Sbob 2022-09-14 17:41:24 Local parent table and Foreign table(s) as partition(s), is it possible?