Skip to content

First range is repeating for the generated partition. #3

@jobinau

Description

@jobinau

Thanks to @gianmh for reporting the problem.

Problem Reproduction step

Create the first partition

CREATE TABLE public.tab1_p0 PARTITION OF public.tab1 FOR VALUES FROM ('0') TO ('500000');

Then generate the new partitions.

./pg_partmaint.py -c "" -t public.tab1 -i 5000000 -p 40 --display

The output generated for newly created partition will contain the same partition again

 CREATE TABLE public.tab1_p0 PARTITION OF public.tab1 FOR VALUES FROM ('0') TO ('5000000')
 CREATE TABLE public.tab1_p5000000 PARTITION OF public.tab1 FOR VALUES FROM ('5000000') TO ('10000000')
 CREATE TABLE public.tab1_p10000000 PARTITION OF public.tab1 FOR VALUES FROM ('10000000') TO ('15000000')
 CREATE TABLE public.tab1_p15000000 PARTITION OF public.tab1 FOR VALUES FROM ('15000000') TO ('20000000')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions