/tools

Partition architecture planner

Design range, list and hash layouts, including range-to-hash subpartitioning. Inspect bound-compatible query candidates, declared capacity and retirement boundaries, then prepare PostgreSQL SQL. No database connection or SQL execution.

Save each form before exporting or changing views. Saving/selecting restores other unsaved forms. Undo keeps 20 revisions in memory; export JSON before reloading.

Partition topology and query candidates

Green: compatible by the supported bounds. Muted: excluded by those bounds. Amber: server routing/analysis still required. These are logical candidates, not an EXPLAIN plan. Hash routing is never approximated as key % partition count.

Layout findings

    Query shape

    Dates: YYYY-MM-DD. Instants: UTC YYYY-MM-DDTHH:mm:ss[.ffffff]Z. Bigints stay quoted strings. Text matching is exact Unicode here; the new-table scaffold uses C collation for text keys. Verify existing server schemas. SQL NULL is separate from the string "NULL" and from IN-list values.

    Table and partitioning design

    The scaffold contains record_id (identity), your partition field, optional hash sub-key and attributes (JSONB). It is a partition architecture draft. Composite uniqueness includes all partition keys; record_id alone has no global unique constraint. Changing strategy preserves inactive explicit partitions in JSON.

    Explicit partitions

    Replace explicit ranges with a generated schedule

    Save the design first. Generating replaces the explicit range list; Undo restores it. Calendar generation uses UTC boundaries, not local time/DST. Month/quarter/year starts must be aligned. Week means seven days from the chosen start.

    Capacity and retirement scenario

    Retirement eligibility means the entire finite range ends at/before the cutoff. It is a review flag, not permission to remove data. DEFAULT, unbounded-upper ranges and hash partitions are not automatically age-retired. No detach/drop commands run.

    Open partition plan JSON
    Scope and PostgreSQL validation

    RANGE supports date, UTC timestamptz or bigint and uses inclusive lower / exclusive upper bounds. Blank bounds are MINVALUE/MAXVALUE, not SQL infinity elements. LIST supports text, including an explicit NULL list bound when nullable. HASH supports bigint/text/UUID and creates every remainder for one modulus. Text key columns in the scaffold use COLLATE "C" to match exact text equality. Optional RANGE-to-HASH subpartitioning also covers DEFAULT. General multicolumn/expressional partition keys and deeper nesting are outside this scaffold.

    Bound previews support direct equality, non-NULL IN lists, IS NULL and half-open range windows. DEFAULT is excluded from a range window only when explicit bounds fully cover its non-NULL values. Unsupported/wrapped predicates remain conservative candidates. PostgreSQL hash values and hash NULL routing are not emulated, and JavaScript modulo is not used. Actual pruning depends on server version/settings, operators, parameterized plans and query expressions. EXPLAIN probes do not include ANALYZE and must be run manually after schema review.

    Primary/unique constraints on partitioned tables must cover the partition keys. This design includes the hash sub-key in the composite primary key when subpartitioning; it does not guarantee global record_id uniqueness. Nullable keys require disabling that primary key. A missing matching partition causes inserts to fail unless DEFAULT applies. New partitions may require validating/moving DEFAULT data. Parent/child relation/index counts and schema-lock/catalogue costs need workload measurement. No universal partition count or performance recommendation is asserted.

    Capacity is a declared uniform scenario, not measured data or a row-size estimator. DEFAULT, WAL, free space, alignment, compression, TOAST, replicas and operational headroom are excluded. DDL creates new objects only; no migrations, recurring scheduling, detach/drop operations or existing-data redistribution are implemented. Create application schemas and validate names, bounds, indexes, dependency/retention policies and lock windows on PostgreSQL.

    Limits: 1 MB; 120 explicit partitions, root hash modulus 1–128, hash sub-modulus 1–64 and 4,096 leaves. Topology pages show 24 top partitions and at most 8 hash children/card; full definitions stay in JSON/DDL. Rows/bytes use BigInt strings; no JavaScript numeric precision loss. Date/instant parsing reuses the temporal tool’s strict Gregorian/UTC grammar. Names assume 63-byte identifiers. Undo keeps 20 revisions. No input storage or transmission.

    PostgreSQL partitioning