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.96) (envelope-from ) id 1w2FIB-0007XC-3D for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:16:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w2FI9-00D1eF-2c for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 21:16:01 +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.96) (envelope-from ) id 1w2FI9-00D1e6-1d for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:16:01 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w2FI5-000000004io-3ClG for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 21:16:00 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-439bc14dcf4so79008f8f.1 for ; Mon, 16 Mar 2026 14:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773695758; cv=none; d=google.com; s=arc-20240605; b=MhaRfRPNnwChDTso/ZB0j7ktIVpyi9U9ohIpKUBZZ65SD9XvSSO3L1PvTQifNSsXoH +bW4RRiwVEoiJjLLnnNR4k8iFwVbLliL6OSlyi9dnLCMs9hBL6W8K+M7FI33Zjv/XdV9 kc7mR1mCFBgoGlC2RDTElCO+66MSS4C/+yq1O/1nBZ+nKp+97pX0v+FiK6pSyPPdDJzX PHVzESwwLCThKRgFh98ZjYBQV/4FAlDl+z8WYGEuSsERf4XklM0K8f7PHS+0rHsCUmNH oj+3y2cvfvIX+tfiFEygrwEsAY4vAeCnudtV58FuQLx1OcvH8SY36zPD7rsNz0KCR2LK TOiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=TdJTTPNHuB5pvEKqt+mxJsmDr1zzNNpVLDto4KxEKbk=; fh=yZ3I9E0o+mdJUMaNxqLAvuLl2MNZmpvI21UKcD6cbwc=; b=N/oTW6LQllQqn2qixG75QEsgxBKst8hgKK33D67Ya+LCFAXNXYy8w+itEHj3jMDEFx EYBhQf092s7e752Rrc0w5boeA0FzXBYXUqbvZ9d4VL/GcJA9dCy5BEPCpyMYM6IgFNkH L7137CZ25DUQlwlt+9FX1WTBbAMo/4B9kUANIJhtGtjVi2apvcKm3SWXm7o4U+mzKoyi fq/ZivCitLf/OuU1QWD6iZXhnia51nQqH4Iuch7fMh6cCarARoULsszWIgrMLOR7fYuL dBEhI4UxKk5GakeudBwHC6CamjbyZZFO1z5D2eSeaq/hzPPFbQsXTE2FQb/C7JB6RQI9 nAoQ==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773695758; x=1774300558; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TdJTTPNHuB5pvEKqt+mxJsmDr1zzNNpVLDto4KxEKbk=; b=cCCLVRnjqLqyr8PL5HCrBrdvIL3rHEPf/NA/JidNxt31Yu6/EC5rtEEyfGeXcYhaQc zebyOCCR3vQbzXMTY4EWBeH4ommwZPEapxkb7sHT704WWxu6GpUunU2rJ0a4MWdmJiun OsZKsfhUtjd5FGGWk8krkqq4vRM+3ehIgrvXuW9SxsAffMFGAD4SodmZSU3esHmMSgU7 6qT09sX1Eock+S1dXl97kIHooY5WgJJ93e4YfMb/aDN5NX+b8FFkXNCV002hy4vxBZaX u8Jads1MW20iD36C3UeZ9u+5jsliKEikf9otOsXdr5ZWyCK6joJS9nNrAi5L8QXpXF+F XYPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773695758; x=1774300558; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TdJTTPNHuB5pvEKqt+mxJsmDr1zzNNpVLDto4KxEKbk=; b=cXU4+Nf7VXhwQxijd2jv0aHutp0kVIgVuKBRi0XPFkir10o58PzkJl4m73QVfPmSfE qSi97Owzd4pj4VXoBsWJJPOr14PFmXNu1xVVhWyacsbZXgzNlO38zYWI/fObbhhA3YpM Gm81I5u/YpM6Md2e3igbDvBJohifK0gMx/dHfEqJySTP8mYAGbP4pgxHn/R1zuPiXnxS qZlD5/GsYsH79RnmRfF0Z2c/N3Hda94zhRz1iNG+InnDaq2DkshNEH6Jn5E5URD38qvj kJMi2sbSMvptnk8qYZiUK21gRONswvbg2sNu1XIynfYORdnhx41pRIEPkfWqJ7znHQOV wiiw== X-Forwarded-Encrypted: i=1; AJvYcCXaNg0yBsZSCucbyBaIUP9JG74/NeyHAp8+5OqC10pM9iMCLfgGh3W1ceS2287qltL/m/OooMq4qE4ayMBg@lists.postgresql.org X-Gm-Message-State: AOJu0YyaHeCoNqHfOtM9IIbZg3W8t0D9Y2wdHyZbM0TrNDZ1pRotoFD1 nKFT+t2InBVpteW9yEj+odzRlF5+x0hkWfdStV+Iteqk1NYsL6TG57um6T/d0jPc6WXzxYP94f6 mzTmpniubUq8GbxhisqYtRKhWjH9f5oc= X-Gm-Gg: ATEYQzy0U3hMJ+/z5dXBvCHGG+gCi7zff+xUnBLIq8gP0st/Im1OsDQ4EAqwG6AAPwu ULSzCu8KsYgEK+cJZIPubQ4/+rK5l3MY5aBtvfAWzvA1zAzDTTQdBG1AQqz/ivXlrifG/e95hvv 8YNxzFdoRYLQzMVvQCghQl+v2T8pasWpBBxR+jADYYgf8MUo1vDarW+itwxbFxOQ+Cm1HiJaFow jPlXNXIU8prE0Bhk4hQ2te0ntP4MyVFFXwO39vuQKOzqH7vL+NkXrcAQJd0plgANCjjNoFwJ7eq LtPwfa9SRIwxXL2HMy3nAq1zDEq/RdwHz7Nj6Bs3xiKDlQ6xN4ulC89Q2wsn6RuMx+eXmWzt X-Received: by 2002:a05:6000:1a89:b0:43b:4312:2cbb with SMTP id ffacd0b85a97d-43b4982b333mr2117454f8f.17.1773695757903; Mon, 16 Mar 2026 14:15:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Tue, 17 Mar 2026 10:15:45 +1300 X-Gm-Features: AaiRm51OW9WSufT8gPJhnKxTV7orN-yXt8q0VGcZVIpycQYgrdjxKNuI_0VJym0 Message-ID: Subject: Re: More speedups for tuple deformation To: Tender Wang Cc: Andres Freund , John Naylor , PostgreSQL Developers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 16 Mar 2026 at 22:17, David Rowley wrote: > > On Mon, 16 Mar 2026 at 20:01, Tender Wang wrote: > > SELECT * FROM t2, t4 RIGHT OUTER JOIN t0 ON t4.c0 WHERE t4.c1 ORDER BY > > > server closed the connection unexpectedly > > Thanks. Looks like I didn't get the startAttr logic correct in > nocachegetattr(). Starting by using the attcacheoff of the first NULL > attribute isn't valid. It should be the attribute prior to that one. > > I'm just verifying some code locally now. Now pushed. Some concerns about the lack of exercise in the tests for fastgetattr() for user tables. I ended up testing by injecting the following into slot_deform_heap_tuple() - attnum = slot->tts_nvalid; + attnum2 = attnum = slot->tts_nvalid; [...] + for (attnum = attnum2; attnum < natts; attnum++) + { + Datum v = values[attnum]; + bool b = isnull[attnum]; + values[attnum] = fastgetattr(tuple, attnum + 1, tupleDesc, &isnull[attnum]); + Assert(v == values[attnum]); + Assert(b == isnull[attnum]); + } + /* Fetch any missing attrs and raise an error if reqnatts is invalid */ if (unlikely(attnum < reqnatts)) Still considering the best way to get a bit more coverage more permanently. David