Background: We manually create daily partitions for few weeks in advance. This is not yet production environment. The 1.5TB size table contains about 90 days of partitions. This is on Postgres 15
Issue: When I try to create the daily partition it just keeps on running forever. It is expected to have atleast 1 year worth of data.
I create the daily partition like this
CREATE TABLE schemapartition.sportsdata_20241202 PARTITION OF schemabase.sportsdata FOR VALUES FROM ('2024-12-02') TO ('2024-12-03');
Limitation: I cannot use pg_partman because I am using a different schema to house the partitions. pg_partman doesn’t yet have capability to create partitions in a different schema.
Question: What do you recommend that I do in order to speed up the partition creation?
There was a lock blocking my session
2
After killing the blocking session my sql went through