-
Notifications
You must be signed in to change notification settings - Fork 273
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
undo_partition
needs to be called twice if there is data in the partitions
#651
Comments
Just for clarification, you're talking about a trigger-based partition set where there is data in the parent table? |
Yes, correct.
…On Fri, 12 Apr 2024, 21:05 Keith Fiske, ***@***.***> wrote:
Just for clarification, you're talking about a trigger-based partition set
where there is data in the parent table?
—
Reply to this email directly, view it on GitHub
<#651 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHL4DOP72TEPJE5QHI6V7DY47L2XAVCNFSM6AAAAABGDS5OHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRG4ZDKOJVHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Trigger-based partitioning has now been deprecated from pg_partman as of version 5.0. There will not be any further development of the 4.x series outside of critical bug fixes, so I don't think this will be getting fixed at the moment. I would highly encourage you to migrate to native, declarative partitioning. Documentation for several scenarios is available here - https://github.com/pgpartman/pg_partman/tree/master/doc |
Closing this issue for now. Please feel free to re-open if you have any further questions concerning this. |
Apologies. This bug was actually observed in
|
If you know you want to undo the entire partition set, I'd recommend just using However
So if you need the entire partition set to be unpartitioned, you need to set https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md#destruction-functions Note the link above is for version 5.0, so the parameters have different names now. But the basic function of Let me know if that clarifies things for you. |
I am calling
however the behaviour is different whether there is data in
my_partitioned_table
or not:Without data:
With 1 row of data:
This means that I need to call
undo_partition
twice if there is data in it, but only once if there is no data. This behaviour is very unexpected and complicated. Please correct so thatundo_partition
deletes all partitions, not just partitions with data, when there is data in the table.The text was updated successfully, but these errors were encountered: