Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPA8W-00AA6r-7k for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jul 2023 23:11:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qPA8U-00CIfN-Cg for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jul 2023 23:11:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qPA8U-00CIfE-2d for pgsql-bugs@lists.postgresql.org; Thu, 27 Jul 2023 23:11:10 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qPA8P-000lv8-Rp for pgsql-bugs@lists.postgresql.org; Thu, 27 Jul 2023 23:11:09 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-686ba29ccb1so945170b3a.1 for ; Thu, 27 Jul 2023 16:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690499463; x=1691104263; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=sbuFjvFhVURTQU+zx69G+sc0HsmHow/2BCCERsPK68w=; b=qb8TdBRq2KFUOsoRyhUsvn+K0FPDXNXPK51i9k2aGWJUNQPJylw+f4Bge1dNeoVyb1 qy+2GbkfTl/rZD+7+QcLRhflPMkxTHLU+6JsFixSJLBN33exNfQTRztNKYgewYtDkeHR ltcoRpMnUSyYhQc7pxxlpPeGEHiOw6paMA37ZBgu0d3gwfOlXGnia0x3PhzDNWNTl/lT QY4szp4fbvDoRx1ByWxZ344bpNuuQaUYOYHeM2yagU2sJtDLaCfa8Z12dmoK4vpuBgBE 7GirSABu9sC5rGIVNHkJBkHEsL7tn3yphvoyEYKGMrgx0/hEX/S7/zS0Pn/9SfgFTbLw MJ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690499463; x=1691104263; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sbuFjvFhVURTQU+zx69G+sc0HsmHow/2BCCERsPK68w=; b=CMEmgioni50J1D0gbgLfu7ULgUD3I2AmtNQK4LAaNpQCbxNcpEvb+BAJomy3JU52/r L7ymhrXohDVjNL8toU1z2KwHh0i+YAaBzfMOboJ3984cnoa2MyxtkjQ1rWscGMUay4jA CdhItP/qHEHpWdqEHKjMKRen4AbF3pfj9Yh1IWTgPQlKhDRaiUaf63YHUw3WihIBaOMx LFQhZojH8auSVBvB34zduBRzUbx9hj44z37bm2JBrZ4G1dcj/9eOQHyKj8sgH0p3jsRh QEDYlanbTP0VkYli3dseyIgPMGjndL/zeKOd4vVh+RYMh9Mk3nOl5rTFk0CFxw+e+JnS mqjQ== X-Gm-Message-State: ABy/qLZIp/rVSoYYSWyNhCiqc9hUCn9rv7kVACLgrr5NVm9u0JgahY50 D8FOUlETPKHJr6f2zUH2OFQ= X-Google-Smtp-Source: APBJJlFR4Hvg8YJASQ18y9R2SfaxnqPPq1+uSrYbFPm95290P6uNel5dNTM62mAFXLHIMnNesFP1ug== X-Received: by 2002:a05:6a00:4096:b0:686:626d:71e with SMTP id bw22-20020a056a00409600b00686626d071emr84875pfb.2.1690499462737; Thu, 27 Jul 2023 16:11:02 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id x18-20020aa784d2000000b00673e652985bsm1964789pfn.118.2023.07.27.16.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 16:11:02 -0700 (PDT) Date: Thu, 27 Jul 2023 16:10:59 -0700 From: Nathan Bossart To: Gurjeet Singh Cc: Tom Lane , Michael Paquier , Richard =?iso-8859-1?Q?Vesel=FD?= , pgsql-bugs@lists.postgresql.org Subject: Re: Fwd: BUG #18016: REINDEX TABLE failure Message-ID: <20230727231059.GA3612597@nathanxps13> References: <18016-2bd9b549b1fe49b3@postgresql.org> <1457241.1688775601@sss.pgh.pa.us> <1867443.1688912310@sss.pgh.pa.us> <20230726175000.GA3259285@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 26, 2023 at 06:42:14PM -0700, Gurjeet Singh wrote: > On Wed, Jul 26, 2023 at 10:50 AM Nathan Bossart > wrote: >> On Mon, Jul 10, 2023 at 09:35:05AM -0700, Gurjeet Singh wrote: >> > The code block movement involved slightly more thought and care than I >> > had previously imagined. As explained in comments in the patch, the >> > enumeration and suppression of indexes on the main table must happen >> > before any CommandCounterIncrement() call, hence the >> > reindex-the-toast-table-if-any code had to be placed after that >> > enumeration. >> >> Do we need to add another CCI after reindexing the TOAST table? It looks >> like we presently do so between reindexing each relation, including the >> TOAST table. > > Yes, we do need to do a CCI after reindex the relation's toast table. > But note that it is done by the recursive call to reindex_relation(), > right after it calls reindex_index(). *facepalm* Ah, I see it now. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com