pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG 12: Partitioning across a FDW?
7+ messages / 4 participants
[nested] [flat]

* PG 12: Partitioning across a FDW?
@ 2020-03-24 22:50  Chris Morris <chris@mysteryscience.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Chris Morris @ 2020-03-24 22:50 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Is it even possible to use PG partitioning across a Foreign Server?

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 07:15  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Chris Morris <chris@mysteryscience.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Laurenz Albe @ 2020-03-25 07:15 UTC (permalink / raw)
  To: Chris Morris <chris@mysteryscience.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Tue, 2020-03-24 at 17:50 -0500, Chris Morris wrote:
> Is it even possible to use PG partitioning across a Foreign Server?

I am not certain what you mean, but you can have foreign tables as partitions
of a partitioned table.  The partitions won't be processed in parallel though.

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






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 15:50  Chris Morris <chris@mysteryscience.com>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 0 replies; 7+ messages in thread

From: Chris Morris @ 2020-03-25 15:50 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

>
> > Is it even possible to use PG partitioning across a Foreign Server?
> I am not certain what you mean, but you can have foreign tables as
> partitions
> of a partitioned table.  The partitions won't be processed in parallel
> though.


I have a large, growing table, that I'd like to start partitioning, but
also would like "older" partitions to be stored in a separate database,
connected via FDW. I haven't played around with partitioning at all yet, so
clearly I'm not sure how to ask the question :)

The hope is to still have one "seamless" table users can query, but to
spread the storage across different databases. I realize that may be asking
for too much.

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 15:53  Stephen Frost <sfrost@snowman.net>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 1 reply; 7+ messages in thread

From: Stephen Frost @ 2020-03-25 15:53 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: Chris Morris <chris@mysteryscience.com>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Greetings,

* Laurenz Albe (laurenz.albe@cybertec.at) wrote:
> On Tue, 2020-03-24 at 17:50 -0500, Chris Morris wrote:
> > Is it even possible to use PG partitioning across a Foreign Server?
> 
> I am not certain what you mean, but you can have foreign tables as partitions
> of a partitioned table.  The partitions won't be processed in parallel though.

Not yet..  There is ongoing work to make that happen though.

Also, accesses through the partitioned table to the foreign tables can
happen in parallel, of course, just has to be through different
connections to the main database.  This makes it reasonable to consider
using a partitioned table across foreign tables for queries that are
pulling back a small set of records, ideally based on the partition key
so that only the one foreign table that has the data you need is
queried, but it's not so good for large analytical type of workloads
where you want to run something across all of the partitions in
parallel (and in parallel on each of the partitions, etc).

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 16:25  Chris Morris <chris@mysteryscience.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Chris Morris @ 2020-03-25 16:25 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

>
> Not yet..  There is ongoing work to make that happen though.


Glad to hear it. :) Thx.

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 17:03  Michael Lewis <mlewis@entrata.com>
  parent: Chris Morris <chris@mysteryscience.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Michael Lewis @ 2020-03-25 17:03 UTC (permalink / raw)
  To: Chris Morris <chris@mysteryscience.com>; +Cc: Stephen Frost <sfrost@snowman.net>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Chris,
Does it actually need to be a different server and database, or would it be
possible to have another storage device added to your existing database and
make use of tablespaces to accomplish pseudo-archive of older partitions?
Just a thought.

>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: PG 12: Partitioning across a FDW?
@ 2020-03-25 17:38  Chris Morris <chris@mysteryscience.com>
  parent: Michael Lewis <mlewis@entrata.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Chris Morris @ 2020-03-25 17:38 UTC (permalink / raw)
  To: Michael Lewis <mlewis@entrata.com>; +Cc: Stephen Frost <sfrost@snowman.net>; Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Right now my dbs are hosted by Heroku, so I doubt I have any control over
the dbs at that level.

Thanks for the idea though! :)

On Wed, Mar 25, 2020 at 12:04 PM Michael Lewis <mlewis@entrata.com> wrote:

> Chris,
> Does it actually need to be a different server and database, or would it
> be possible to have another storage device added to your existing database
> and make use of tablespaces to accomplish pseudo-archive of older
> partitions? Just a thought.
>
>>

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-03-25 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 22:50 PG 12: Partitioning across a FDW? Chris Morris <chris@mysteryscience.com>
2020-03-25 07:15 ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-03-25 15:50   ` Chris Morris <chris@mysteryscience.com>
2020-03-25 15:53   ` Stephen Frost <sfrost@snowman.net>
2020-03-25 16:25     ` Chris Morris <chris@mysteryscience.com>
2020-03-25 17:03       ` Michael Lewis <mlewis@entrata.com>
2020-03-25 17:38         ` Chris Morris <chris@mysteryscience.com>

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