-
In a multi-tenant app, where pg_partman and citus extensions are used, is there a way to define the partitioned table's 'retention' period at each 'tenant' level, rather than for the entire table scope? For tenant A, retention can be 12 months, for tenant B, retention can be 24 months, though both are monthly partitions. I do not see a way to achieve that with present |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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. |
Beta Was this translation helpful? Give feedback.
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.