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 1sqvyD-00E9zv-2A for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2024 14:47:53 +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 1sqvyB-00BDCk-N5 for pgsql-hackers@arkaria.postgresql.org; Wed, 18 Sep 2024 14:47:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqvyB-00BDCc-Co for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2024 14:47:51 +0000 Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sqvy8-001pA4-KP for pgsql-hackers@lists.postgresql.org; Wed, 18 Sep 2024 14:47:50 +0000 Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-82aac438539so174901039f.1 for ; Wed, 18 Sep 2024 07:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726670868; x=1727275668; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YXsF2GC2TWNXhmBxRuM2nGRrlva3b0qRPy+keR91od0=; b=idnwtuiq9W0s7mL8Y5WXhVC613VpORtCAqsCJFq4bYaaS6mY0kn+ACcRCtW5ZwbfsZ xQtBEp6Z+gUoetGmjLBlY6Zr7X37gsoHLmcCTOhJ05G+B41Jep/BOJiWBFPNEQheYZV6 sQb8RfFUduLgpYRCkCSVgYDMAIUV6kCaCrD9QOmgxw+2CJB9AFUFbl95Ut31UzwtqBx+ 11WbCAEQNo/3H7mC/jNKImkoTvzc7r10ak8MrVVhpfJDbdfLw22zEkflW7HKMeVlvzlf c8HkTKI25Lo0fCZyZAwUHhmFVEwSVWYD0EYA+hHw+a0ujoampHwl6cALr0XYnvPC5JDT Oe5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726670868; x=1727275668; h=in-reply-to: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=YXsF2GC2TWNXhmBxRuM2nGRrlva3b0qRPy+keR91od0=; b=QKswPT83uDMaaeC25Z4b3XcG55fwKqmQBH8J+cETltpstoNx7y5yustiXI3Spru1GC UVHwYn3AZk4aZCIXBIhi6Jk1yrUkVbrlLW4Soj/BABAtv4vtMmlN+GUjS3Iihmhutdvl Xr4a5A+nwU3Imqn0IYRwPonbtF8BEhkX+1xRakzMyUMImrlbRUh/Eqv6P7K3M5ypvazP UI3y+yeoiwwsKs72DbcLolue7ciUaw3u5pT14vztx+XTJ4gVU3uPh9sSF7XUT44SuzeJ joAQb/6WXg4HTT/2KHQfNM5tCMkPCFukd9vkI4Tl7OqVqLiZ04X1EwPluqH6b5Tdw8tS 2UgA== X-Forwarded-Encrypted: i=1; AJvYcCWUPlHiiwZOwhR+HfDx8lbpoNSqyOIBD3EYYJFTRbjKLVfEW5ztMNGN4DmRE8k9TjKUrMO1WK8Icb2NwoQr@lists.postgresql.org X-Gm-Message-State: AOJu0YyJk+1ZOXOzFA9QAF0OnV0Intfnv0K9DCluG85FqYMLypDNcfx8 ZErFOA612+DFqgJHCsZgjGLJTEYx76IyLkAUDCx8M6uRVjalvD1RcAAB7g== X-Google-Smtp-Source: AGHT+IF0pNU4YUF6+zMxYauPGg5ldX5MWMBwDFXkCspZBbQI8FDM7Y8fEJekgtEKFXX4bPO3AGSpCQ== X-Received: by 2002:a05:6602:1645:b0:82b:40f:63c6 with SMTP id ca18e2360f4ac-82d376b4869mr1574404739f.4.1726670867621; Wed, 18 Sep 2024 07:47:47 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d37ec17ea6sm2487700173.38.2024.09.18.07.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2024 07:47:47 -0700 (PDT) Date: Wed, 18 Sep 2024 09:47:45 -0500 From: Nathan Bossart To: "Jonathan S. Katz" Cc: Tom Lane , PostgreSQL Hackers Subject: Re: Large expressions in indexes can't be stored (non-TOASTable) Message-ID: References: <1679756.1725476893@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Sep 04, 2024 at 03:20:33PM -0400, Jonathan S. Katz wrote: > On 9/4/24 3:08 PM, Tom Lane wrote: >> Nathan Bossart writes: >> > Thanks to commit 96cdeae, only a few catalogs remain that are missing TOAST >> > tables: pg_attribute, pg_class, pg_index, pg_largeobject, and >> > pg_largeobject_metadata. I've attached a short patch to add one for >> > pg_index, which resolves the issue cited here. This passes "check-world" >> > and didn't fail for a few ad hoc tests (e.g., VACUUM FULL on pg_index). I >> > haven't spent too much time investigating possible circularity issues, but >> > I'll note that none of the system indexes presently use the indexprs and >> > indpred columns. >> >> Yeah, the possibility of circularity seems like the main hazard, but >> I agree it's unlikely that the entries for system indexes could ever >> need out-of-line storage. There are many other things that would have >> to be improved before a system index could use indexprs or indpred. > > Agreed on the unlikeliness of that, certainly in the short-to-mid term. The > impetus driving this is dealing with a data type that can be quite large, > and it's unlikely system catalogs will be dealing with anything of that > nature, or requiring very long expressions that couldn't be encapsulated in > a different way. Any objections to committing this? I've still been unable to identify any breakage, and adding it now would give us ~1 year of testing before it'd be available in a GA release. Perhaps we should at least add something to misc_sanity.sql that verifies no system indexes are using pg_index's TOAST table. -- nathan