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 1oLQOZ-0003qu-Cy for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 14:39: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 1oLQOY-0007dP-Bq for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 14:39:46 +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 1oLQOY-0007dG-13 for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 14:39:46 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oLQOV-0004bN-SU for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 14:39:44 +0000 Received: by mail-pj1-x1034.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso12377298pjd.3 for ; Tue, 09 Aug 2022 07:39:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc; bh=WTUslaxi9uRI94hdU4ZtPQwdaRxHFAX+0cKrPGxkC00=; b=l7/y2tijlD8rOLX1M2D8/U8Py4MWqYtb8xlY88syejcYrPtPGU0GFI6tlyBQab/VDm h3Vzl2UrVp+UAE2Zuwc6DRtr1/uALji3bg7s0xvRz9mD5Q5Vf6SQbCciowZDjuT43bVk oLq+C3s39nBnLezkLrS+2kgntUCy0eN0JbVJ5kBLaijVOr/+hDMR4cFgZGTnuXkeuETU P1FeEF63PrxHQ0HWkdkIKFFwAEcq8w69UEeMkcB8IlyB4tzoUJ+nIwzh2kqKNO3e1mK/ 1ZOK15Y+xRCDTQ690F9IUssuowt7fYmeTAdLmlX1pHDw3sIOGzE9PSAKUyEvw/71maYS DLTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc; bh=WTUslaxi9uRI94hdU4ZtPQwdaRxHFAX+0cKrPGxkC00=; b=68IYNyjRIlDtxeobal76ygooiUlJ0eBBayqyXdPoZdwM6s4QNUiSWGAA9fXoN2Edaw amFIa1DXp3nF4+AZaJvbddWzS4+XSTbjZniW0eALam9HRDvpdFBYD3Ej9i7HIScsY+GO w29eqeFFrJaHPZeXUHN79QKrWOlWemUjaRsBo96hbDIN6/s2LkbfDrouipb8OX0PMMOl a3WbJeQX+lzBUbMuMmzgqI4im7fushcXDYhaYOesrNMqLyjo0Qu6qzdBvkxWgLAGVhWw TuOAs/ZkPKB8bb/pytaEQ6DxOxIiaJdLb5DXAXG3uJHOyQwKtDIA9oN2tdVvii0Q+BFp uciA== X-Gm-Message-State: ACgBeo35MOBQDcs36anwTakc7e2pAKgaFugmpsq5AuiHyAvpidbSyNH7 gFAe2YRi3kKJGzQLv3D64Ag= X-Google-Smtp-Source: AA6agR7Iq7AyCC5kiaBrgSg9qyWzZZj2RCVWMiArfwMQYFY+xQnroe0WnJmtgHkLbGQdeZjxqAJBrg== X-Received: by 2002:a17:903:24e:b0:16b:a02d:41fc with SMTP id j14-20020a170903024e00b0016ba02d41fcmr23947900plh.121.1660055982625; Tue, 09 Aug 2022 07:39:42 -0700 (PDT) Received: from smtpclient.apple ([155.98.131.4]) by smtp.gmail.com with ESMTPSA id b11-20020a62a10b000000b0052def2e20dasm10643736pff.167.2022.08.09.07.39.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2022 07:39:42 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Creating A GIN index on JSONB column (large database) From: Rob Sargent In-Reply-To: Date: Tue, 9 Aug 2022 07:39:40 -0700 Cc: pgsql-general@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Taylor Smith X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Aug 9, 2022, at 7:04 AM, Taylor Smith = wrote: >=20 > Hi all, >=20 > I have a database that is in excess of 20TB in size, partitioned by = date on a month to month basis. >=20 > There is a column within that stores text (validated to be json but = not stored as JSONB). I have a requirement to make the json searchable = using GIN indexes. however when we try to create the GIN index on AWS = RDS our temp storage maxes out which crashes the create process = resulting in unhealthy created indexes.=20 >=20 > This might be an AWS issue but we are wondering the reason why = creating these indexes (concurrently) would cause the temp storage to = blow up and crash out and is it possible to mitigate or a necessary = evil.=20 >=20 > The only solution we have so far is scale up our RDS instance. >=20 > Kind regards, >=20 > Taylor Smith The scale-up might be needed only for the create index. Scale down = afterwards?=