-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Hello! Today for the second time we faced strange pg_pathman behavior.
Base table:
CREATE TABLE prices
(
linkId integer NOT NULL,
date integer NOT NULL,
price double precision NOT NULL
);
Range partition:
SELECT create_range_partitions('prices', 'date', '1451606400'::int, '2419200'::int);
Before "problem" last partition was "prices_7". last record date was 1466663582. Then we insert 3 records with date=1466664722. And... pathman put them into partition "prices_2007". So we have "prices_7", 2000 empty partitions and 3 records in "prices_2007".
We dropped all empty partitions, but serveral minutes later pathman writes new records to "prices_2766" starting with date=1466665444. 722 seconds and 759 new partitions =)
Right now we have "prices_3373" and i think it will keep growing.
What can we do to help fix this problem? We have similar problem with other table in other db and fixed it by recreate whole table from scratch. I'm going to do same thing here, but if you need some additional info - it can wait for several hours.
UPD: Almost forgot versions! Postgres 9.5.3 (https://hub.docker.com/_/postgres/), pg_pathman from master (2775b5a)