-
Notifications
You must be signed in to change notification settings - Fork 59
feat: Add CLI/Environment variable support for PostgreSQL partition intervals #959
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
base: master
Are you sure you want to change the base?
feat: Add CLI/Environment variable support for PostgreSQL partition intervals #959
Conversation
…al on initalization
Pull Request Test Coverage Report for Build 18586761341Details
💛 - Coveralls |
Thanks for proposal but I don't like over engineering. |
My goal was to introduce weekly,daily or monthly partitioned tables because currently we only create weekly partitions. For some cases single partitions can be too big or small and people may want to store them daily or monthly partitions. Thereby I wanted to introduce this option to be able to start with different partition intervals at the beginning. Let me know your opinions. |
What I am trying to say is if we want to provide custom intervals then why do you want to have predefined options? Let user decide what exactly interval they want. This way you don't need to bother with predefined options, just use time arithmetic and we're done |
Hi @pashagolub , I had a chance to work on this MR according to your feedback and introduced the Basically, the user will be able to define its own custom interval and partition naming will be handled in admin sql functions. I hope, thanks to this enhancements, people will be able to define custom partition intervals and change them for the new partitions to be created. Thanks for the feedback! |
Thanks for your work! I was working on the same issue. I will check what we have in 2 weeks. Until then Postgres conferences are in a full run |
Please check my approach to sql functions here f4cd404. I'd prefer to use mine version because:
|
The Definition and Basic Details
--partition-interval
command-line option. It prevents year-based and minute-based intervals for optimal performanceadmin.config
table to manage partition intervals for PostgreSQL type of schema in sink.1 Week (168h) Example
3 Days (72h) Example
Possible Advantages
Created this PR for #958