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 1tFemD-00EiW3-88 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Nov 2024 19:29:41 +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 1tFemA-00HN6F-Pm for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Nov 2024 19:29:38 +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 1tFemA-00HN66-FO for pgsql-hackers@lists.postgresql.org; Mon, 25 Nov 2024 19:29:38 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tFem8-003ok6-9o for pgsql-hackers@lists.postgresql.org; Mon, 25 Nov 2024 19:29:37 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-6ee805c96dbso43201917b3.2 for ; Mon, 25 Nov 2024 11:29:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732562973; x=1733167773; 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=VR5SysTIa/OsrXOkazoJIyRYH1f8kgnGv3qGhw77Xw4=; b=BIh7eKDXlSNlYtjn4Av5AqlAsiOYX9+YqT4B/aC980tgtd+QPpnz9ClC3hVdt7v9Zi 95s2V9eclCs77rkCVjU1JXNrHvnIkvvKmS1Gbe76RqiVingYnr6l6t/n7AkiWFRJJKWE c3elFYvDHLU8iEWKkI1neEdL+9adNe1G6tC6YM4l8yi8hikvgxm9zsJDI4rAYQer9H42 JAB+K11ZziZ71J5SPcQ6KrUbMFcfIBUUvu5Xj7Dfn/KT4agtx0R00u4y7TUW5gojP4Zs 8fbJxXUhOxBHkZSCj+owB9F3KSJqutsEQ4NgK7Oo+hLSVdCvUgZ/N6Y9Urxl55f3XcqH E9zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732562973; x=1733167773; 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=VR5SysTIa/OsrXOkazoJIyRYH1f8kgnGv3qGhw77Xw4=; b=vOU/vOVweqtvz0vp9FyUWV5HyvXQ8UwgI5CogD5B9usdi67ZUGhZ4emyaM0mPXhjwb s8OJ4tATylcdx/KPGwOAhKybvSR1ruqsuiYkXcg/DeKkVkwHFcxSGAnBZvZAkA4hzxGo IMK0Cku/yGto0+fKDwxt/w9lIMoOdt+M9YiW8modQibN6jIXG96p7+7msniKoNAquiKP 50ljJsXpFL2qfCnk+ybRHsgNEjsG2oIUNgdzyUVRUX+iUw1FPBJo76TUVlmj8gGwTJHC FvPqSFOIiQH8ArmqrMhnErs1k0oJKEh4KzqnS+EKS52/om8/2zdnr378RuYTKGug6Uki kPlw== X-Forwarded-Encrypted: i=1; AJvYcCWOztbe3C+ZU92LUVow1lHaz0O+3P3EXK5oNiE2r6xh/9VbR+2Qx37/XBTGp8acxHLIn4pnbJAeo6RXvk+5@lists.postgresql.org X-Gm-Message-State: AOJu0YxGoOxt2UHtiOlsOAgLC8GH9UmKzSgWEbUlNiSe3oBA7gF5NHmq Dhm98GioBgW1YUsq/4Fgh3EKt5GfB0N+L4HBFDcuO9D6l3/22LcL X-Gm-Gg: ASbGncvUzstmlX9GuViErIKs4Wse8IFZjySQV51y+F9yTSC7EqvUXxODNfsqAtUCJFZ jtO7kTKNtNVj4IaOMMEfPIJ0MCvJAokrj9VALQKPLjmmjbxsSYPIceanE+eUm0uqGMQ+YEGeppX fm1V1HE6iQ7PU5IzchBBmoQ/G6HSqdw+a4kTy6ODqE/5E+veYnEAyrLzdxpjcC+Pui7C7iXPR9E qPcIDOoEMNPTtD4xWQ1QF3/Tc+Iu4AmptBmbcd+CRTwtG+lfYFKs/EnQG/RhumoCfXEb5+YHO0l qFAZ+4Pt1ZpYu6aWPwVpqmnN88BEq7gnb8lhvgiz X-Google-Smtp-Source: AGHT+IHiuuoHMUfwdJUk0T+GpcezCelmHkIDw1jdECxoHfRGii8NbFtmfU4IlaarRn/bM+gV62+NsA== X-Received: by 2002:a05:690c:7202:b0:6e3:1f02:407b with SMTP id 00721157ae682-6eee08cd6c5mr116360827b3.11.1732562973413; Mon, 25 Nov 2024 11:29:33 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d451a96ae7sm46070176d6.29.2024.11.25.11.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 11:29:32 -0800 (PST) Date: Mon, 25 Nov 2024 13:29:31 -0600 From: Nathan Bossart To: Michael Paquier Cc: Alexander Lakhin , Tom Lane , "Jonathan S. Katz" , PostgreSQL Hackers Subject: Re: Large expressions in indexes can't be stored (non-TOASTable) Message-ID: References: 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 Thu, Oct 31, 2024 at 08:45:15AM +0900, Michael Paquier wrote: > On Wed, Oct 30, 2024 at 03:54:32PM -0500, Nathan Bossart wrote: >> I'll manage. 0001 was a doozy to back-patch, and this obviously isn't a >> terribly pressing issue, so I plan to wait until after the November minor >> release to apply this. > > Okay by me. I took another look at 0001, and I think it still needs a bit of work. Specifically, IIUC a few of these code paths are actually fine since they do not ever touch a varlena column. For example, clear_subscription_skip_lsn() only updates subskiplsn, so unless I am missing a corner case, there is no risk of trying to access a TOAST table without a snapshot. Allowing such cases would involve adjusting the new assertions in 0003 to check for only the varlena columns during inserts/updates, which is more complicated but seems doable. Or we could just enforce that you have an active snapshot whenever you modify a catalog with a TOAST table. That's simpler, but it requires extra work in some paths (and probably comments to point out that we're only pushing an active snapshot to satisfy an assertion). >> I'm having second thoughts on 0002, so I'll >> probably leave that one uncommitted, but IMHO we definitely need 0003 to >> prevent this issue from reoccurring. > > I liked your idea behind 0002, FWIW. We do that for a lot of fields > already in a Relation. Alright, then I'll plan on proceeding with it. -- nathan