public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
To: Pavel Borisov <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Anastasia Lubennikova <[email protected]>
Cc: Rahila Syed <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: [email protected]
Cc: Fabien COELHO <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Amul Sul <[email protected]>
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
Date: Tue, 2 Mar 2021 14:26:17 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALT9ZEHSqRaANsDe2kmnk5W3MBgiq8Nu0Z5T88-jXzDW3tmh=w@mail.gmail.com>
References: <[email protected]>
<[email protected]>
<CAH2L28v_fmXvDF+UzMDCObgd7nuqSU=HAJPfw7w4TMx5HGv5ig@mail.gmail.com>
<[email protected]>
<CAH2L28vRKPw+uf3Voiy6zy5QUghTPueErNTz_xgpkxEKnmfL1A@mail.gmail.com>
<CALT9ZEH4YotxVz4n4CdeFO7fvkg1EczZJUAWpfzERNZzm4X6fg@mail.gmail.com>
<CALT9ZEGG11+p3URZgKbKz62Vu5Fj10OKq4P59V=coiNnr7eO1g@mail.gmail.com>
<[email protected]>
<CA+hUKGL3ymvLb67Hsjh3scGFwRStcwzOkdLtuDwEF+nz_vbyyQ@mail.gmail.com>
<CALT9ZEHSqRaANsDe2kmnk5W3MBgiq8Nu0Z5T88-jXzDW3tmh=w@mail.gmail.com>
https://commitfest.postgresql.org/32/2694/
I don't know what committers will say, but I think that "ALTER TABLE" might be
the essential thing for this patch to support, not "CREATE". (This is similar
to ALTER..SET STATISTICS, which is not allowed in CREATE.)
The reason is that ALTER is what's important for RANGE partitions, which need
to be created dynamically (for example, to support time-series data
continuously inserting data around 'now'). I assume it's sometimes also
important for LIST. I think this patch should handle those cases better before
being commited, or else we risk implementing grammar and other user-facing interface
that fails to handle what's needed into the future (or that's non-essential).
Even if dynamic creation isn't implemented yet, it seems important to at least
implement the foundation for setting the configuration to *allow* that in the
future, in a manner that's consistent with the initial implementation for
"static" partitions.
ALTER also supports other ideas I mentioned here:
https://www.postgresql.org/message-id/20200706145947.GX4107%40telsasoft.com
- ALTER .. SET interval (for dynamic/deferred RANGE partitioning)
- ALTER .. SET modulus, for HASH partitioning, in the initial implementation,
this would allow CREATING paritions, but wouldn't attempt to handle moving
data if overlapping table already exists:
- Could also set the table-name, maybe by format string;
- Could set "retention interval" for range partitioning;
- Could set if the partitions are themselves partitioned(??)
I think once you allow setting configuration parameters like this, then you
might have an ALTER command to "effect" them, which would create any static
tables required by the configuration. maybe that'd be automatic, but if
there's an "ALTER .. APPLY PARTITIONS" command (or whatever), maybe in the
future, the command could also be used to "repartition" existing table data
into partitions with more fine/course granularity (modulus, or daily vs monthly
range, etc).
--
Justin
view thread (38+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] Automatic HASH and LIST partition creation
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox