Future partition names generated incorrectly for one table #722
Replies: 1 comment
-
Going to admit you've got me stumped on this one. With a partition interval of 1 month, it should always be truncating it to the beginning of the month. I tried recreating your scenario and it seems to have worked without issue. See below. The only thing I can think of at the moment is that somehow the part config interval got changed temporarily for a certain maintenance run then changed back. If you drop that table then run Will be hard for me to debug this anymore unless you can provide a reproducible scenario. Not saying there is no bug, there certainly could be. But I'd have to see it happening to diagnose it any further.
Tried increasing premake even more to see if it was an issue beyond another year
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I have partitioned several tables using pg_partman (5.1.0), and everything works fine except for one table. The future partitions for this table are being created with incorrect names.
Here’s an example of a table where future partitions are generated correctly:
dap_dau_activebase_default
dap_dau_activebase_p20231101
dap_dau_activebase_p20231201
dap_dau_activebase_p20240101
dap_dau_activebase_p20240201
dap_dau_activebase_p20240301
...
dap_dau_activebase_p20251101
dap_dau_activebase_p20251201
And here’s an example of the table with the issue:
dap_mindbox_mailings_default
dap_mindbox_mailings_p20231101
dap_mindbox_mailings_p20231201
dap_mindbox_mailings_p20240101
dap_mindbox_mailings_p20240201
dap_mindbox_mailings_p20240301
...
dap_mindbox_mailings_p20251101
dap_mindbox_mailings_p20251130
As you can see, the partition for 2025-11-30 is named incorrectly, and there’s no partition generated for December 2025.
I’ve double-checked the configuration in partman.part_config and confirmed that it matches the settings for other tables where everything works as expected.
Queried the minimum and maximum values of the partitioning column action_dtm:
SELECT MIN(action_dtm), MAX(action_dtm)
FROM public.dap_mindbox_mailings;
2023-01-25 15:07:16.370 +0500 2024-12-20 11:01:30.000 +0500
Checked for NULL values in the partitioning column action_dtm:
SELECT COUNT(*)
FROM public.dap_mindbox_mailings
WHERE action_dtm IS NULL;
0
You can also find my partman.part_config table in the attached file
part_config_202412201219.xlsx
Could you please help me understand why this issue occurs and how I can fix it?
Thank you
BR Andrey
Beta Was this translation helpful? Give feedback.
All reactions