pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jim Vanns <jvanns@ilm.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Dynamic creation of list partitions in highly concurrent write environment
Date: Thu, 01 Jun 2023 09:32:17 -0400
Message-ID: <3807.1685626337@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH7vdhOeJ59QsogfWi-zY-AKRomVQjzRHzXH699AHxo_kvD09w@mail.gmail.com>
References: <CAH7vdhOeJ59QsogfWi-zY-AKRomVQjzRHzXH699AHxo_kvD09w@mail.gmail.com>

Jim Vanns <jvanns@ilm.com> writes:
> Here's the general approach we have, without code and with hypothetical
> model, since I'm writing this hastily;

> table devices; <-- After trigger on here
> table routes; <-- To create physical partition for this logical table
> table route_for_device_N; <-- The dynamically created partition

> We don't know the device names and thus partitions up front, hence the need
> for dynamic creation. How do you go about doing this or is it folly!?

Sounds like folly, TBH.  You're going to end with a ridiculous number
of partitions of the routes table, which will not be good for performance.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <3807.1685626337@sss.pgh.pa.us>
Permalink:  ../3807.1685626337@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3807.1685626337@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jvanns@ilm.com
  Subject: Re: Dynamic creation of list partitions in highly concurrent write environment
  In-Reply-To: <3807.1685626337@sss.pgh.pa.us>
  References: <CAH7vdhOeJ59QsogfWi-zY-AKRomVQjzRHzXH699AHxo_kvD09w@mail.gmail.com> <3807.1685626337@sss.pgh.pa.us>

* 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