Postgres中的动态表分区 [英] Dynamic table partitioning in postgres
问题描述
例如,我一直在寻找将postgres分区数据划分为基于时间戳的表的方法,但是不必手动添加相关的子表。我看到了这篇博客文章,
I was looking up ways to have postgres partition data into tables based on timestamp for example, but without having to add the relevant child tables manually. I saw this blog post that does just that
https://blog.engineyard.com/2013/scaling-postgresql-performance-table-partitioning
但我对此想法表示怀疑基于字符串连接创建表并检查pg_catalog的过程。这是一个合理的想法吗?
but I'm dubious about the idea of creating tables based on string concatenation and checking the pg_catalog. Is this a reasonable idea?
推荐答案
pg_partman 是专门为管理分区管理的复杂性而创建的扩展。我没有使用此扩展名,但我使用了同一位作者的其他扩展名,它们通常质量都很好。
pg_partman is an extension created specifically to manage the complexity of partition management. I haven't used this extension, but I've used others by the same author and they are generally of excellent quality.
这篇关于Postgres中的动态表分区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!