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 1waZXN-001tqx-0Z for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jun 2026 13:45:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1waZXM-00GSXz-09 for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jun 2026 13:45: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.96) (envelope-from ) id 1waZXL-00GSXr-2T for pgsql-hackers@lists.postgresql.org; Fri, 19 Jun 2026 13:45:35 +0000 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1waZXK-000000019Aw-1Gzu for pgsql-hackers@postgresql.org; Fri, 19 Jun 2026 13:45:34 +0000 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-c0be5e548a4so49690366b.3 for ; Fri, 19 Jun 2026 06:45:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781876732; cv=none; d=google.com; s=arc-20240605; b=QJWs4immhWFUW+MXqvqjG8HmLjs28UihOFvQySMxjcmzBle+dZBAYFZTfU3PavbpUL xnuJ/OHm1faMRqs6+obvf4Ed1R3QZgBdekMpvZOuXP+I0Ttd13HaS2ps+5mZ7lU+Jkt6 LUo/+g8c0xh40NSbhDTDGq8f4AcS2hSK7xrAFnsB8/unX6RtIFgVfq+CWEMg3yT0RmvN 1/2otkingwChVf+A3JL9gezze8Lj3aMcDq/PyWW2jmwKx4Ruvz5T6r2pVO474dcHM/0k FThh65mA5b4g8GtCJXn5G2z+md5TrUCnGYUHBhWpV2kJMwb9YyF2R2w1EN6+ELWltiLQ BzWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7BIiMfglMCUtCalQJfbD66eR7NNcdtMIb99tcRbwS9A=; fh=HYbti0PnrcLqbTdnOhZqwq3Dkm8Q3l2Nw2lXHURlWr4=; b=eB8mj1TNZTBHqvKczlskdTAD39qSHbgRiIPjEzBAvXoLyR6W3SDVd05CsHt1OEt6/C DWTcEgQ10taodmMiMcPhkT4knFJOuJNP7Y0qAK7AU4ajdYQBtcjp9ywttzrP5DGotMBR lei5a1+r3lkXLe0wqEObxISQ0ydjrgbHQhrVTm29SanmG5oKEKVMwZ0c1HMfdxnd+2EW QxGmO5fADeBRDOwL7m5f0wLus5EZrPHqFL0k8iyQExdGem+d7g6JikdvCcYwqrwsa/Kl r/cPgx2rRSpmVhK6fFaS7rBlmxabdTDoMawkxCDZzLZFZDh7XOfsHBzsxzDUir8/UZVx fBVA==; darn=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=20251104; t=1781876732; x=1782481532; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7BIiMfglMCUtCalQJfbD66eR7NNcdtMIb99tcRbwS9A=; b=fC5ajWGHdm1zT9YCvOFDHQgpZbi69J6EEhCxZ0tszmn2EJZloxWgVirOcQox82vOZJ OSQI6tAthaWnpjYTjrmHfeRwnwYfP87w0OYFn1XxoxAwdXk8nKJyp/dbx1H/sEaZWJ6N 8Uvl+rEph/W28SK9EmyOC5DuFPn0MByx2mLMl2jpQ44MSfn5j5wgJC3jcpqw9hogkEFM wfDRmxP8lWPFyybY9qsPLKOddGUwaEQBc52jNBkhhctMH6wTVoClGio9TxPO/Ev7YdQt yxOz4fnIXCh5Btat5dKdpvIPjtEUFQC60UV4NrcLK6j+01cRfo9dskCt4d+fC5B7hTnE 1NXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781876732; x=1782481532; h=content-transfer-encoding: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=7BIiMfglMCUtCalQJfbD66eR7NNcdtMIb99tcRbwS9A=; b=cXXhBsquSfaEq5frv0lJHRvm/pR5R5cywPM1RYCg/wTpncg/6isTpjcxziwZQ+RS6h sHbS9F2n6sXrgPTcAcv7Hr27ORFact0Iika9k8y0bOfSWHwAMUvNWor7tO2GJFZhI4W5 YHTsxcpO8M5TFLAvKo8KG8yPe2Amx1edl7pYQ7Elk25LGUUzyE9/oh777LUwu9pq89i3 UUkJ8icayFuPsMfDc0igDonFGrkIlkVmUvG+4ZXNPhDIOwvQ2Jdg3kRwHNAF0ZhFd8wx WHjO5ZJRm9rxvn7ic+rqJNT2vswKFGu+wq5t3XzHu2Bqti+Dtr88abZZcwWXExnY08Vr 0B8w== X-Forwarded-Encrypted: i=1; AFNElJ8BJt/UcULfAPeUDWTrue1dM+I4Axl4ztxbtMBHgLRRo5FQADESkAPl8SslVYpe77fkz9j4WDMMngt9WHUj@postgresql.org X-Gm-Message-State: AOJu0YzRw5IRIq/voDTB0dWX0WQXljKTJOLRxisRo5b/y4Z6IP1YNL+3 D703CS6KRRwQ1b1ysijJXLzgWjsEFByzjFNs573ftsntfb2VqdkV4CW4+Sg851A7DWrUbRMl2tz KPXE90HGe7q7l3qe3fRIxbtjDBD2scrM= X-Gm-Gg: AfdE7cl3PPJm7aclgOqLH1fmM143H4YuOVXFjPOLH70vNYG6h+OiyTweMMB53pfcmxT MBZzpfg/h13s/udVYJAm2H2K+GQh2XypuQFPXMI8wSS4GVgxVZ3V2BPSRECSZ1HvxKHpPlAnK9i HL8uP0XL08f9/mutN8mP2tkdg5zHHCEYRj+RbD+hu+JUOF41Kr7nwTFd+yY+xfKYIwQ7zeyYUla MgaXDo2r10VTppPsLyhpTxDa5K2l/FWHEDMLNuD8Uc6rLJChJIMRx++hrvHOWiFre7m4j4/bQb8 jag4B+nY7OOs6R6f0ei5C4OukTaFvwCiXlSD9kQ= X-Received: by 2002:a17:906:518f:10b0:c0a:5acd:ecc4 with SMTP id a640c23a62f3a-c0a5ace09e2mr125969466b.36.1781876731842; Fri, 19 Jun 2026 06:45:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Fri, 19 Jun 2026 09:45:18 -0400 X-Gm-Features: AVVi8CfUSroLBb6M5HXNVylJ_E3I5dBvwUfp9p8ccBeZv9EhCm1JR77gfX1Mrl4 Message-ID: Subject: Re: use of SPI by postgresImportForeignStatistics To: Corey Huinker Cc: Etsuro Fujita , "pgsql-hackers@postgresql.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jun 18, 2026 at 5:23=E2=80=AFPM Corey Huinker wrote: > To be clear, this solves the SPI problem, but questions about the design = of attribute_statistics_update() and relation_statistics_update() remain, b= ut those concerns are now isolated within their respective files attribute_= stats.c and relation_stats.c. The inefficiencies therein aren't really in a= critical path, so if we wanted to leave them be until v20 they could, but = if time allows I'd at least like try unwinding some of that. But first, let= 's get SPI out of postgres_fdw.c. I think that's the right order of priority, but I don't think that having import_attribute_statistics construct an fcinfo is great. Ideally, attribute_statistics_update would call import_attribute_statistics rather than the other way around. --=20 Robert Haas EDB: http://www.enterprisedb.com