Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9TCd-0005qV-3b for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 14:41:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9TCc-0001wG-08 for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 14:41:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9TCb-0001w0-K0 for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 14:41:45 +0000 Received: from mail-oi1-x234.google.com ([2607:f8b0:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n9TCV-0003o1-EZ for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 14:41:45 +0000 Received: by mail-oi1-x234.google.com with SMTP id x193so23763179oix.0 for ; Mon, 17 Jan 2022 06:41:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=prn4bCUVJZuj6wFa6GQxsf+TZRWKrSCmsqUiWG9MrKc=; b=Qsv6GzQp/pz0tjlloBgRoqaE3Kd+R4ssuNAdPRu0y7iVkDhHNmWDe9SLPIO/tidDF+ LMbuNjmsVaH1Pt8rZLvKLXTeKt+9uB2iA+UNGqfprO2PpAz5hfKv7GYzwFrLwOFwYEEf S2DMZklSCmBTLmLXdgeRTPkAov9AoyXh9le7H2I/vzpUUodUiHiyW7WHm1b2oKl5AlzG K3/qubdJf0tPLAosr+c64fiKu0xzM2+e1Mef1Re7tAPnHp6Jb5Fy6G5+teQVhJIC5NvU /CZ1G4LWvNjaZY6fkOq0d9s3kiT7ptj3f74Y9Hm4JEdD2vpgp0k+Z+SoFTnQd1jfMJT2 d1Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=prn4bCUVJZuj6wFa6GQxsf+TZRWKrSCmsqUiWG9MrKc=; b=Q17lhf0Wwh0owayzW9ghS13iuoVyxO1CavxV41KlJIQfR+s1zm9MBwspFuNnP2Q2kl iZoU3rWNgemYFyHRMmiQLiaYN0dPVxOyeee8TJJhDDMElCqNnf3xiSI/G50is4YeA+++ nxO4LRvpMf3fIZnhUbsr/1AsdO/GpH+9N4Wbw4woynGnaRFHdsKmMbuQUswgDOfa/apE 4tni3dQevKohTfclYCh3//z6XB7w73n5O3RXp/IH6zTY2d8zHdyjIDdCiRbeNuvnteI/ B9yh0AmBwjRhoovtDVH2KF+suFfcKHS+A8rxDwcVmIWrqIjresapXXxRnM0BLjZSlqzJ /vRQ== X-Gm-Message-State: AOAM530LhQV05KCUchcNxEGwqzbm3+z1zPOi1uDxh2dFR63u2yU2moGk T2uU/SUQ4AJ1dlu86zL1vIYQFCjFbwY= X-Google-Smtp-Source: ABdhPJwhrCU2pS79/MY0cjBqobMv+VM1VAA2vPvDLS4ARTddJUMfYa3s4GXHp767QB1ISakPXyMfoA== X-Received: by 2002:a05:6808:1707:: with SMTP id bc7mr17750157oib.86.1642430496285; Mon, 17 Jan 2022 06:41:36 -0800 (PST) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id q189sm6415082oib.8.2022.01.17.06.41.35 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jan 2022 06:41:35 -0800 (PST) Subject: Re: Large number of partitions of a table To: pgsql-admin@lists.postgresql.org References: <3919502.1642393668@sss.pgh.pa.us> From: Ron Message-ID: <671340a5-1960-e5dc-1d09-4b7f36cda2c8@gmail.com> Date: Mon, 17 Jan 2022 08:41:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------DFAB6169ED6D37477C7B4B55" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------DFAB6169ED6D37477C7B4B55 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 1/16/22 11:38 PM, Victor Sudakov wrote: > Tom Lane wrote: > [dd] > >> The specific point that depesz was responding to in that blog >> was the 64K-ish limit on rangetable entries in a query. That is >> a thing, as he could have shown by using queries that weren't >> amenable to plan-time pruning. (It's also an ex-thing, having >> been fixed for v15 [1]; but that doesn't help you today.) >> Now, if you use no queries that can't be pruned to a few >> partitions, then it's academic for you. > The table will be partitioned `BY LIST (customer_id)` which is a unique > index. All queries will be using this index Good. > so no query should ever have to use more than 1 partition. I find it hard to believe that you'll *never* run a report against more customers than are in a single partition. > > This means basically I'm OK? > -- Angular momentum makes the world go 'round. --------------DFAB6169ED6D37477C7B4B55 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 1/16/22 11:38 PM, Victor Sudakov wrote:
Tom Lane wrote:
[dd]

The specific point that depesz was responding to in that blog
was the 64K-ish limit on rangetable entries in a query.  That is
a thing, as he could have shown by using queries that weren't
amenable to plan-time pruning.  (It's also an ex-thing, having
been fixed for v15 [1]; but that doesn't help you today.)
Now, if you use no queries that can't be pruned to a few
partitions, then it's academic for you.  
The table will be partitioned `BY LIST (customer_id)` which is a unique
index. All queries will be using this index 

Good.

so no query should ever have to use more than 1 partition.

I find it hard to believe that you'll never run a report against more customers than are in a single partition.


This means basically I'm OK?


--
Angular momentum makes the world go 'round.
--------------DFAB6169ED6D37477C7B4B55--