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 1oLSMs-00019T-0P for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 16:46:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oLSMq-0001no-T6 for pgsql-general@arkaria.postgresql.org; Tue, 09 Aug 2022 16:46:08 +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 1oLSMq-0001nf-Ic for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 16:46:08 +0000 Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oLSMo-0004G2-MJ for pgsql-general@lists.postgresql.org; Tue, 09 Aug 2022 16:46:08 +0000 Received: by mail-oi1-x22d.google.com with SMTP id c185so14507745oia.7 for ; Tue, 09 Aug 2022 09:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=VmL3cwS5Tnclihs+ZSXtTcqKVT2IM96h45Hsw4Qr5oI=; b=JpkFs2ylgXHc+vyPZIl2ORKotkr50miqC0wEGLdWTseLNVQE++aLseIt5PH+xiIduD BE2vCidQtMyyhTLnFL96q/9hW05A+oTIXERtfK5fpbT29rnqbqLeB9WFmmV8Kgac2236 Xj+n5Il/Dsh3yZTor/gc3KeU33jrsjclwFNBv3ELt5OXnb2SM3lsycanN60NaBzRR2/1 ZBKZUd+ZOGJQhviGc8HVuT4FQ/0v1vb3IaCaROGSEYFr8ZlnhnSXoIHl4Z7fwCtY9CAY 83/+9mG9ROWVGNUUjkvyDu593SlCZCGgVmParJTn5OXkuEDsvvBWjUKTondFXnZojOjk SexA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=VmL3cwS5Tnclihs+ZSXtTcqKVT2IM96h45Hsw4Qr5oI=; b=SvsSfQc7bk7gE+pW1BSr2PdwT+dNe4352Yu4BYWU1Q7qO0HTrcxGh42hVT/iSFLrQe 7omqcU9TXjMH/IuouGHIyLQ1EVVPI3SEv7WpCvpJectIAsg1f4CCSUKMWmMF1ObyRv2v GuQ93SVMqwfT/gM1pT6ZAfo0n9YNujY07SmwJvXlv4zLEUyBm+P4801AOZ6TxmQvYaZW kZr5ynLtnS3sPndrhazOM2DWAn9Xy4o7xDts7qvCmlnhR6zHTfGWp7mPLFUZcq1gmrTS VwsEyepbjcQbdIF+JrkHXmtNzmb1ksRlI4jMmj7beQ1fVDzfc8iVuvLjHsBE/HDRsUIw BqzQ== X-Gm-Message-State: ACgBeo0elLCyvf/VKW46d1lfeWhpl6DZB1uG4AxGavJWsyf91Pc6lIjl vG2TVu72n6Z65KEzKntXXbp+XDfpIQY= X-Google-Smtp-Source: AA6agR6HcL1J/R1RRWmAjJ/8uiMjWSJnAaDmtPPyGQeGlD8rBtyv/GsOxt+xJLn/Zy3YyuurKHK4ww== X-Received: by 2002:a05:6808:1294:b0:33a:de39:89e8 with SMTP id a20-20020a056808129400b0033ade3989e8mr10242420oiw.236.1660063564692; Tue, 09 Aug 2022 09:46:04 -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 w9-20020a4aa449000000b004488a706d1bsm45641ool.44.2022.08.09.09.46.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 09 Aug 2022 09:46:04 -0700 (PDT) Message-ID: Date: Tue, 9 Aug 2022 11:46:03 -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: From: Ron In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/9/22 09:39, Rob Sargent wrote: > >> On Aug 9, 2022, at 7:04 AM, Taylor Smith wrote: >> >> Hi all, >> >> I have a database that is in excess of 20TB in size, partitioned by date on a month to month basis. >> >> 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. >> >> 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. >> >> The only solution we have so far is scale up our RDS instance. >> >> Kind regards, >> >> Taylor Smith > The scale-up might be needed only for the create index. Scale down afterwards? Scaling down disks means using DMS (which costs money) to migrate the instance to a new instance. -- Angular momentum makes the world go 'round.