Self-managing PostgreSQL partition tables

前端 未结 4 980
深忆病人
深忆病人 2021-01-03 08:52

I am trying to make a self-managing partition table setup with Postgres. It all revolves around this function but I can\'t seem to get Postgres to accept my table names. Any

4条回答
  •  佛祖请我去吃肉
    2021-01-03 09:43

    Dynamic partitioning in PostgreSQL is just a bad idea. Your code is not safe in a multi-user environment. For it to be safe you would have to use locks, which slows down execution. The optimal number of partitions is about one hundred. You can easily create that many well in advance to dramatically simplify the logic necessary for partitioning.

提交回复
热议问题