Skip to content

Partition retention time based on tenant #425

Answered by keithf4
anandsowm asked this question in Q&A
Discussion options

You must be logged in to vote

pg_partman does not have this sort of support at this time.

Even with this sort of support. I'm not sure how you would do that in a single level partition scenario. The retention would essentially be whatever your longest period was. Just as a thought experiment, I think you'd have to sub-partition with the top level being your tenant value and then the sub-partition would be time. You'd then be able to set different retention's per tenant. This would be challenging to do in a general sense in pg_partman, but, if the tenant value is integer-based, you could do the sub-partitioning with pg_partman, but you'd have to have some external process doing the retention per tenant.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@anandsowm
Comment options

@keithf4
Comment options

@anandsowm
Comment options

Answer selected by anandsowm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants