From: jakubmalek (@jakubmalek) <noreply+jakubmalek@github.com>
To: pgpartman/pg_partman <noreply+pgpartman-pg_partman@github.com>
Subject: Re: [pgpartman/pg_partman] issue #870: Error while creating nested partition with pg_partman
Date: Thu, 25 Jun 2026 13:28:48 +0000
Message-ID: <gh-pgpartman-pg_partman-870-c4799813588@github.com> (raw)
In-Reply-To: <gh-pgpartman-pg_partman-870@github.com>
References: <gh-pgpartman-pg_partman-870@github.com>
There is also problem with nested hash partitions:
```sql
CREATE TABLE IF NOT EXISTS events (
id BIGSERIAL NOT NULL,
customer_id BIGINT NOT NULL,
event_time TIMESTAMPTZ NOT NULL,
data JSONB NOT NULL
) PARTITION BY HASH (customer_id);
CREATE TABLE events_p00 PARTITION OF events
FOR VALUES WITH (modulus 3, remainder 0)
PARTITION BY RANGE (event_time);
CREATE TABLE events_p01 PARTITION OF events
FOR VALUES WITH (modulus 3, remainder 1)
PARTITION BY RANGE (event_time);
CREATE TABLE objects_p02 PARTITION OF events
FOR VALUES WITH (modulus 3, remainder 2)
PARTITION BY RANGE (event_time);
```
Then when range partition is created:
```sql
SELECT create_partition(
p_parent_table => 'public.events_p00',
p_control => 'event_time',
p_interval=> '1 day',
p_type => 'range',
p_premake => 1,
p_constraint_cols => ARRAY['id']);
```
I get this error:
```
ERROR: partman functions only work with list partitioning with integers and ranged partitioning with time or integers. Found partition strategy "h" for given partition set
CONTEXT: PL/pgSQL function show_partition_info(text,text,text,boolean) line 109 at RAISE
SQL statement "SELECT child_start_time::text, child_end_time::text
FROM public.show_partition_info(p_parent_table, v_top_interval, v_top_schema||'.'||v_top_tablename)"
PL/pgSQL function check_subpartition_limits(text,text) line 52 at SQL statement
SQL statement "SELECT sub_min::timestamptz, sub_max::timestamptz FROM public.check_subpartition_limits(p_parent_table, 'time')"
PL/pgSQL function create_partition_time(text,timestamp with time zone[],text) line 105 at SQL statement
PL/pgSQL function create_partition(text,text,text,text,text,integer,text,boolean,text,text[],text,boolean,text,boolean,text,text,bigint) line 383 at assignment
DETAIL:
HINT:
CONTEXT: PL/pgSQL function create_partition_time(text,timestamp with time zone[],text) line 401 at RAISE
PL/pgSQL function create_partition(text,text,text,text,text,integer,text,boolean,text,text[],text,boolean,text,boolean,text,text,bigint) line 383 at assignment
DETAIL:
HINT:
CONTEXT: PL/pgSQL function create_partition(text,text,text,text,text,integer,text,boolean,text,text[],text,boolean,text,boolean,text,text,bigint) line 638 at RAISE
```