pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Creating A GIN index on JSONB column (large database)
Date: Tue, 9 Aug 2022 11:53:28 -0500
Message-ID: <eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com> (raw)
In-Reply-To: <CAPLtOcni6VzF-ERXY4xNrci+au9G6TWX8cMn+miGzcmb74SX0Q@mail.gmail.com>
References: <CAPLtOc=Psv+jm73YQDW-x0jj2qhvFBDVh0nK0MoSB=hRKAxL=Q@mail.gmail.com>
	<F7BF73FE-42EF-4804-971B-59D270DFCD6D@gmail.com>
	<CAPLtOcndi0WzU1vHL-AhbJB4P25RmywbTkeDUbfNkfGh_=RTzg@mail.gmail.com>
	<46275978-098E-42D4-BA61-AD1F7F282678@gmail.com>
	<CAPLtOcni6VzF-ERXY4xNrci+au9G6TWX8cMn+miGzcmb74SX0Q@mail.gmail.com>

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.

view thread (7+ messages)

Message-ID: <eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com>
Permalink:  ../eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com/
Also on:    postgresql.org/message-id/eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Creating A GIN index on JSONB column (large database)
  In-Reply-To: <eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com>
  References: <CAPLtOc=Psv+jm73YQDW-x0jj2qhvFBDVh0nK0MoSB=hRKAxL=Q@mail.gmail.com> <F7BF73FE-42EF-4804-971B-59D270DFCD6D@gmail.com> <CAPLtOcndi0WzU1vHL-AhbJB4P25RmywbTkeDUbfNkfGh_=RTzg@mail.gmail.com> <46275978-098E-42D4-BA61-AD1F7F282678@gmail.com> <CAPLtOcni6VzF-ERXY4xNrci+au9G6TWX8cMn+miGzcmb74SX0Q@mail.gmail.com> <eeabb0d8-a262-9f93-72b7-0952b0d406b8@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox