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 1oLSU3-0001UP-BW for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 16:53:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLSU2-0007hL-8d for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 16:53:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oLSU1-0007VQ-LU for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 16:53:33 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oLSTz-0005qW-0W for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 16:53:32 +0000 Received: by mail-oo1-xc30.google.com with SMTP id u7-20020a4a8c07000000b00435ac1584a6so2211798ooj.1 for ; Tue, 09 Aug 2022 09:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:from:to:cc; bh=j+i6vlywOquLsE5NZQ8HQDeKcrDcH4sdja+aKnD+f+Y=; b=YuWJkHsYSUTy4c1yfmLnpexeV7snVORCffHul41U6nrfQp8CxeGyrT3bifaBd9vOBc mk8exjiIwNVAwDKyON1s21Tdk5mFRWNXpF1qs8DdzV6ZpBgZgnCA+OmbJ8xVGqao+uAX 5dMbhVrRUJsfB6DXehcObJXcyPnGew6z3+qnN5dWmtlaQ1bGHc2DKpXUO7jVKQ1rV+ji 1VPqXRneGnMHQYgNGBZy7e1BQ03v7dIrkAor2rGzMZjN3/QILxU08XkbTLf1dSp/WWn0 Cum1RAZIC5+yKdrs5JYq12E+6cGlQYyxaAyX+rH0TSs7e8hNHwBOWeZz4vOc5fRA8wd0 8UjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc; bh=j+i6vlywOquLsE5NZQ8HQDeKcrDcH4sdja+aKnD+f+Y=; b=AG0IZUwwGpeCms2RXAhV0bBnhEp7xeR9ctYW5uQ9IGEyejU8fGlEcHI/wb5ya4XxOi wcv9Dn0h6uaSEuTfVdQc+MfOfbXDrPw/c81Dm+QQgeKtgUGasEFAuayvjlBH7wQH4l0q gpUIZU6N0OhZWOX/taJP5w8LRkqArUfSrEw5zXFwb3YLB5iwfeG6/Ic4dmuFHGjND69s VXbDuDEef8Zsx+dScRKsWBm7y9oD0x090gIFPbtnpwbncxSwwrc0p4ZII0AV77a/tWjh owmqFAcGEPRx8CMqOfIC+7YpgY4sbuiAq39QUwrbB2JPgVuQenj5LW8zH6iiA18UuA9b l4+w== X-Gm-Message-State: ACgBeo1rVk3NXzVzsB80BmDKKRWNUIraQ6u++iqZxH0yXpI5vuYVNquf N+U+5thXqlV4CAjbXMvLyY3JBn7B9tg= X-Google-Smtp-Source: AA6agR6il8DIH7hsyHoc+dP0aPxJCSKSlOZ924fKqS9HFOvOqCU3g7q5Z6qKdnoJjRZSUY0ebbznjQ== X-Received: by 2002:a4a:978d:0:b0:435:d1e6:a73c with SMTP id w13-20020a4a978d000000b00435d1e6a73cmr8424846ooi.44.1660064009954; Tue, 09 Aug 2022 09:53:29 -0700 (PDT) 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 r5-20020acac105000000b00342d18cc2fdsm56528oif.53.2022.08.09.09.53.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Aug 2022 09:53:29 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------A7PLjP0oSockH5XQrirT09BR" Message-ID: Date: Tue, 9 Aug 2022 11:53:28 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Creating A GIN index on JSONB column (large database) Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <46275978-098E-42D4-BA61-AD1F7F282678@gmail.com> From: Ron In-Reply-To: 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. --------------A7PLjP0oSockH5XQrirT09BR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 800GB/20TB = 4%. You've got a 20TB database, and run out of space when *4% is added*. Either you're running way to close to the edge, or I misunderstand something. Either way, enable auto-scaling. https://aws.amazon.com/about-aws/whats-new/2019/06/rds-storage-auto-scaling/ On 8/9/22 10:29, Taylor Smith wrote: > Yes, the database was always going to be a minimum of 20TB however we > build the indexes on the partition which at max is about 1.3TB, which in > temp files will use about 800GB temporary files. Note it doesn't have the > same effect when doing non-concurrently. I don't think rolling off would > help as its likely largest partition will either be the current month or > the previous month so the problem would still persist. > > > > On Tue, Aug 9, 2022 at 3:50 PM Rob Sargent wrote: > > > > > On Aug 9, 2022, at 7:45 AM, Taylor Smith > wrote: > > > > Thanks Rob, > > > > This is what I was thinking. Would you say it presents any risk then > having a database unable to rebuild its own indexes if needed? > > > > > > No I would not.  The scale-up + rebuild should tell you how much you > actually need and if you’ve over done the scale up you can scale down > to what you need.  Was the original spec expecting 20+T?  Any chance > of rolling older months off to some other node? > -- Angular momentum makes the world go 'round. --------------A7PLjP0oSockH5XQrirT09BR Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 800GB/20TB = 4%.

You've got a 20TB database, and run out of space when 4% is added.

Either you're running way to close to the edge, or I misunderstand something.

Either way, enable auto-scaling.  https://aws.amazon.com/about-aws/whats-new/2019/06/rds-storage-auto-scaling/


On 8/9/22 10:29, Taylor Smith wrote:
Yes, the database was always going to be a minimum of 20TB however we build the indexes on the partition which at max is about 1.3TB, which in temp files will use about 800GB temporary files. Note it doesn't have the same effect when doing non-concurrently. I don't think rolling off would help as its likely largest partition will either be the current month or the previous month so the problem would still persist.



On Tue, Aug 9, 2022 at 3:50 PM Rob Sargent <robjsargent@gmail.com> wrote:


> On Aug 9, 2022, at 7:45 AM, Taylor Smith <taylorjrsmith@gmail.com> wrote:
>
> Thanks Rob,
>
> This is what I was thinking. Would you say it presents any risk then having a database unable to rebuild its own indexes if needed?
>
>

No I would not.  The scale-up + rebuild should tell you how much you actually need and if you’ve over done the scale up you can scale down to what you need.  Was the original spec expecting 20+T?  Any chance of rolling older months off to some other node?


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