Search Postgresql Archives

Re: concurrent re-partitioning of declarative partitioned tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2 Dec 2020 at 15:59, Michael Lewis <mlewis@xxxxxxxxxxx> wrote:
You can not have overlapping partitions that are both attached.

Not directly, no. That's why I'm considering the _partition_channel hack.

Why do you want to merge partitions that you are "done with" instead of just leaving them partitioned by day?

I have some random access index lookups on columns not in the partition key, where values are unique over the entire table so at most one partition is going to return a row. A lookup that touches 4 or 5 pages in each of 100 partition indexes is more expensive than one that touches 6 or 7 pages in each of 10 larger partition indexes.

Why are you partitioning at all? Are you confident that you need partitions for performance & that the trade-offs are worth the cost, or are you needing to detach/drop old data quickly to adhere to a retention policy?

I do want cheap drops of old data, but also many queries have indexable conditions on non-key columns and also only want records from the most recent N days, so partition pruning is useful there with small partitions for recent records.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux