-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add retention period configuration #132
Comments
Is this currently implemented (e.g. pg_partman takes care of it) or library users have to sort it out on their own? This also looks like something that should be on the README. 🤔 I could probably contribute with your help. |
Ah, it is already there. One has to create the table as partitioned from the very beginning. I wish I knew this earlier. For everybody else, see this: https://github.com/tembo-io/pgmq?tab=readme-ov-file#partitioned-queues |
We don't have an API for it, but a queue should be able to change from regular to a partitioned queue through manual steps. All of the read/write/delete operations are compatible with both. That would be a really cool contribution. |
I am thinking of doing this in two steps:
The downside is that any operations on the queue must be paused. I am really new to partition management. Please, share your thoughts 😄 @ChuckHend |
pg_partman's background worker handles the partition management, such as creating new partitions and dropping old partitions. The pgmq pgmq_create_partitioned() api handles configuring pg_partman for the queue. Lines 126 to 130 in e00e716
What I was thinking is that we could create some new function: In case of non-partitioned -> partitioned, we'd probably need it to execute the migration_to_partman outlined in pg_partman's 4.7.1 docs |
For SQS feature parity. Messages too old should be automatically deleted.
The text was updated successfully, but these errors were encountered: