-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run_maintenance is not working #39
Comments
Can you give me the schema of your parent table and the exact options you used with create_parent()? Also the version of Postgres and the version of pg_partman (and pg_jobmon if it is installed? |
Actually, if just prepartitioned data is your issue, pg_partman does not automatically move the data when create_parent is run. Otherwise it would be locked and unusable until it finished. Use the python script (partition_data.py) included to partition the data out and automatically create the child partitions. All of this is explained in the documentation file. |
this is the whole schema: CREATE TABLE partition.details -- Trigger: details_part_trig on partition.details -- DROP TRIGGER details_part_trig ON partition.details; CREATE TRIGGER details_part_trig And this is what I used for the partitioning: SELECT partman.create_parent('partition.details', 'type', 'id-static', '2'); I read the documentation thoroughly but it didn't work in real but lets say I have a table where column "type" has 0,1,2,3,4,5,6. When I used the extension created child tables from 2 to 16 and none of the prepartitioned data were partitioned, the other issue is when new numbers are inserted no new child table will be created (18,20 etc...) no matter how many data I insert. Last issue is why rows where type is 0 are not being inserted to child table p2? Thank you in advance :) |
This seems to be an issue only when setting the partition interval to "2" for serial partitioning. Had similar issues with someone trying to set it to "1" and had resolved that it's not possible to handle that cleanly and a partitioning interval that small was unrealistic anyway. I'll see if I can fix this for "2", but again, this is a very unrealistic partitioning interval. I'm assuming you were just doing this to test it out?
There was no data, so the current partition is partition.details_p0, who's maximum allowed value is "2". So I ran an insert statement to insert up to "5". This caused the next, future partition to be created: partition.details_p15
|
Yes, this is my testing table, I need to test first before implementing it to my actual DB, thanks for the reply, I'll test it along with the python script and let you know the results |
I'm going ahead with changing the minimal interval for serial partitioning to 10 in the next version. Should avoid confusion like this and even that is still far lower an interval than I'd ever suggest partitioning a table. |
v1.8.2 has been released with the above mentioned fix. |
id-Static partitioning is not working probably, when using the extension on a table with data inserted, all pre-partition data does not go to child tables and after running run_maintenance, no child tables are being created, how is it possible to overcome this problem?
The text was updated successfully, but these errors were encountered: