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 1rbTlW-00Fbpl-EZ for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Feb 2024 23:06:38 +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 1rbTlU-008Wk6-BN for pgsql-hackers@arkaria.postgresql.org; Sat, 17 Feb 2024 23:06:36 +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 1rbTlU-008Wjy-0w for pgsql-hackers@lists.postgresql.org; Sat, 17 Feb 2024 23:06:36 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rbTlR-007HCL-Gg for pgsql-hackers@lists.postgresql.org; Sat, 17 Feb 2024 23:06:34 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2d1094b5568so42764201fa.1 for ; Sat, 17 Feb 2024 15:06:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708211192; x=1708815992; 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=RAA4DYaED49Lh24iclV9s6ZMr/MGvS0+GooBUC+/6f0=; b=ibegacimv8w0GVPevyss/Wotc25DyL38THqlvX/pUNMzzOP5y2N8hBxPbNMYti5qTO OwTZAq2rT3FySXLVYysjn7cKgEGlUa31hr/UdtJ0eP5+kiNmNvT78bIV2w9pPZwAUx0G 30lIENFdn+HpIfvr0dyZZwGeY26JCqcWw8uUpQp64hfdWqzzbjcpRCDw5ilxVi+neSaR EstV1K6FvUa57/h9/e5dksi4HWXM0SFfvIrh8lHza8nijpjdSNInTYojB5t5E4sDkjSC CqCf9qXT9I2YXpR6VYHod98uRU0ytyOZ4a/9JykhG2pNjbKiPDj/6LocvMGOIsCvJ9DZ 2j+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708211192; x=1708815992; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RAA4DYaED49Lh24iclV9s6ZMr/MGvS0+GooBUC+/6f0=; b=nrG/IvhZZW2+Q24ZKMwXmzYKgT7TuhWLVyeBEiIwVhqZ69UFGgduquemmoA+VNiRoE 0fz5PyeOHt2062XRnkwCRmP88lRI2ALP3AEAb2BB6a+AyScvV2WeiTxg1zOmmLgpATfp B2qyPZ5RF0JeczSJVt7IWimqlQDU9sDhkzG9riircsJm6VbtUzwqTL2oSXjXtpb9COLl 3nD/PnFZOyP3HUu9uGo2LzPOsOMu/sQD+UmMi8vC2smxEAWIM0Kt+Sd4MDFafd82GenV PZL0X9gc56zXjjrL4zLrchscCEanAz2rPSYxMvgaV0IoBAj6AiyOMjMYNUPFpvmV676G oSvQ== X-Gm-Message-State: AOJu0Yy9OwKlM4aRwivbaC14vTD+m3RjT3d4rILeYbBGN/XF4sJcTXvC emiJeIZpRkd//Rr3KplJR8TYgSwDFfEyS2cbTk/KtjIIgtU4pwsUe2YEf6EHYlYZ+ciqVTe8Qbc 1+KS/3g0x09cIumMjGSXmDncBbkfTQMuiIuQ= X-Google-Smtp-Source: AGHT+IGxRvzVMx8QJXG3wBzGzkIiwMwBaWzi6xgxTmTvkqJJCfzNNWE93rgRaWKiTGMjVv4JWetgXT/OCoz6izbLoTo= X-Received: by 2002:a2e:3c12:0:b0:2d0:8a78:9e69 with SMTP id j18-20020a2e3c12000000b002d08a789e69mr5599816lja.52.1708211191753; Sat, 17 Feb 2024 15:06:31 -0800 (PST) MIME-Version: 1.0 References: <4b27fc50-8cd6-46f5-ab20-88dbaadca645@eisentraut.org> <859d6155-e361-4a05-8db3-4aa1f007ff28@eisentraut.org> <9818bd29-3eff-40c5-ad6a-8d89ba8c7acc@illuminatedcomputing.com> In-Reply-To: <9818bd29-3eff-40c5-ad6a-8d89ba8c7acc@illuminatedcomputing.com> From: Matthias van de Meent Date: Sun, 18 Feb 2024 00:06:19 +0100 Message-ID: Subject: Re: automating RangeTblEntry node support To: Paul Jungwirth Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 16 Feb 2024 at 21:36, Paul Jungwirth wrote: > > On 1/15/24 02:37, Peter Eisentraut wrote: > > In this updated patch set, I have also added the treatment of the Constraint type. (I also noted > > that the manual read/write functions for the Constraint type are out-of-sync again, so simplifying > > this would be really helpful.) I have also added commit messages to each patch. > > > > The way I have re-ordered the patch series now, I think patches 0001 through 0003 are candidates for > > inclusion after review, patch 0004 still needs a bit more analysis and testing, as described therein. > > Re bloating the serialization output, we could leave this last patch until after the work on that > other thread is done to skip default-valued items. I'm not sure that the cleanup which is done when changing a RTE's rtekind is also complete enough for this purpose. Things like inline_cte_walker change the node->rtekind, which could leave residual junk data in fields that are currently dropped during serialization (as the rtekind specifically ignores those fields), but which would add overhead when the default omission is expected to handle these fields; as they could then contain junk. It looks like there is some care about zeroing now unused fields, but I haven't checked that it covers all cases and fields to the extent required so that removing this specialized serializer would have zero impact on size once the default omission patch is committed. An additional patch with a single function that for this purpose clears junk fields from RTEs that changed kind would be appreciated: it is often hand-coded at those locations the kind changes, but that's more sensitive to programmer error. Kind regards, Matthias van de Meent