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 1weGXn-004g5J-2u for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 18:17:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1weGXm-004PkK-2J for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 18:17:18 +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.96) (envelope-from ) id 1weGXm-004PkC-1O for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 18:17:18 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1weGXk-00000000pF6-0rxd for pgsql-hackers@postgresql.org; Mon, 29 Jun 2026 18:17:18 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-c126b8118afso175076466b.2 for ; Mon, 29 Jun 2026 11:17:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782757035; cv=none; d=google.com; s=arc-20260327; b=SxiPfH8IiqIq2/mHJnIyQ+G7mVHa7HjIRLHuG9Z6VrfewETbYyiRubCWRSNR0AXHia HiFQPaU2EXOlltCd+spNL0qSfhQZ+5ONfKpk1cS/COEGJUFXbK0Vjn5kP7jD/rz7m8dX jttllwXToQoeWonCVIIHEDAs3LKfejPFoibqDMLgrO+0n4+k4uuW4oxGbWx1oJMs0KNO rcZO9bL154uvYt74Jr1w8aXtRL2H+75nMYPVQlHFmNmMB3BR1ycBvr2Nr3aHypilYZ8m bG3KYVwXgwwEYa2ZEGcyOeyGy6wFa0b2H+ZpYehqs19iJ1BYjzeyGwV4RGLkKrukRNcI RqBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6G5CJxGlxKExTn/Idb4Sq5lEy2lzlJ9KEI1WiHeI2cc=; fh=4bc0EyFzbgRvqrEOvMVl95pENPKQH5iuTaIQ1FDQxi4=; b=q8bEnG0F8+EZTll7/ETf/O9mKbo+764eZ5VMku8BSyvRE91gV78ftvCyLAzEWOy3a0 bIiiSO8WHUzllnCiir3VgB84uz0perHD0x+c5tK7UAhyUq874U7XBWe/S3qOfznKX5Q6 JN/fbtPas4C4HNbULsOVEdM+Ynxq1LeXVxv2/iDTRg0tArt7NX75qddiKwUXpHSn7/O+ UETeQSjK9oYKzcDamwl5bzVarsrFBuPNJN7ZfpHGJUxTZTIRMPSNQLa2EtJhQ7BVU5RJ /tQ8+hiJHWbaSLcyBiUgY8FcCZiQSAzVsOdt9F4AQSqZMc0IY6CMCibC4LkpxpzwT9xt zCtw==; 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=1782757035; x=1783361835; 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=6G5CJxGlxKExTn/Idb4Sq5lEy2lzlJ9KEI1WiHeI2cc=; b=ADrOT2SnOUdniyiey5m1NlcwWMPlXV0QrUZNF6auFpAHJfh9z7QfkKciJ4PJr4FOba lTG6pRmAxb6iEjtXQH7Ia+A2D2L3HlXEqEwteQ9eJ7A1bKRQrtsXKZ+lwrNH2HrVxAtM XH3EF+3htlhb86BB2PC8PxDX4+4Il2gb4jTzQiavB6qgcWFJzHPEqO0BCmqHuh97+3ck UGvBptT6cn1bEcX+bouRQEB00EqRj6PLehuK1fA9jqNsC+pOxHrCbHhknQ0RcjAQeTc7 80ybGwCMVmkbGMnxltecFN6COWFfddArrYuYtY5q9MwiNqp3p/m/qRs3AHrsegs97+8v aM8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782757035; x=1783361835; 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=6G5CJxGlxKExTn/Idb4Sq5lEy2lzlJ9KEI1WiHeI2cc=; b=Pq97qVQ1i2g/WsidwDkjTZ+O/brzq1jaMBdZAqCRAQLtyZ5aKOR+S6vVw3jN9K5DxB e1+0sMRx7KMs0vIyl8tOMrzbYRFqxDz5GyzomgxzQxuPN7bVEBZtU4e81jET3jjXFdDI 8XVWdgBNzkJbmnw0+G3h0QR0QYLbu+4N9YRR0zBt9QL3vuCKFyt5SmludgvQryFU6/+W LRerxlUwT7WF6jy+4F0jvxd9ZIFcbrozC1zJU4Ujj8lUGIYlWKVRwtAJmYzO3uH2NrFB 5uINwJD50co8sBoxB+OprXOD+mBUF90pC2XZ+ueoCzEg4eZ8Caawg/qXAhX+sovPaHGO pm5Q== X-Forwarded-Encrypted: i=1; AHgh+Rp1LP7uctrDgLV33W57ctH8BoEdQufKA9dgBtvwClKiF/dgLcjR2ilSISlUJ6oi7CRzf3IvFzwOJQnDurIY@postgresql.org X-Gm-Message-State: AOJu0YxBQLQT1fx7RMBBEZX2OzeqJThXTXlal/KFEVP6bsQO5NNKX+C3 rPfEJNA39uMqmfDfepGNNvyeEnnMv+UBo59GafmPQrJJl8+iCQk4LCbPfVFLLdXSlaysQdHE96H vwYavHGIHb96XiLM1r3yyjEbUlpbLqWE= X-Gm-Gg: AfdE7cmy86MlDNW3+243e1GYoRdvvmr/9bjFfYFTyObu3CwMREegyYQBIKs+vRLJOSq xWJMkvt9QVRdfApzuITS6QYyqB1otCgI5ZHnPFsH37/BmB3qzIY3HPxxVA32Sfy9iNiiz2a/JG4 OGLSkLw1e591+2eUHWJPMAoQ9kuj9u4IU1EIsDIfXyTkCsfaLO3VwNiz4tjViF5FQv77c5r89Ey d7YFURzzfC+YDFkgrWZFyE+6oNqQz+bSEkApZYV8awOoM2XQ/UnLfXhUcLgR5kMe/intjRb9hKL +ePQAIwp3AYYwy5MBYjYJenFwsfbcqfK+fyTkrqR X-Received: by 2002:a17:907:6e8c:b0:bef:1512:fdf2 with SMTP id a640c23a62f3a-c128724f351mr19499866b.10.1782757034894; Mon, 29 Jun 2026 11:17:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Mon, 29 Jun 2026 14:17:02 -0400 X-Gm-Features: AVVi8Cc0nQdtYLviPyArCGZzHo_egmz3eMNF1kNeSnODiHLr6JgJDWhmx33GINM Message-ID: Subject: Re: use of SPI by postgresImportForeignStatistics To: Etsuro Fujita Cc: Corey Huinker , "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 Mon, Jun 29, 2026 at 7:50=E2=80=AFAM Etsuro Fujita wrote: > I like this refactoring, but while it's rather mechanical, it's pretty > large, so I think it's too late to do the refactoring at this time > just before the beta 2 release. So I'd vote for going with your > v1-0001 and v1-0002 and doing the refactoring in v20. As mentioned by > Robert, I don't think it's good to call LOCAL_FCINFO() in > import_relation_statistics() and import_attribute_statistics() to call > the guts of those functions either, but that is *consistent* with the > existing way pg_restore_relation_stats() and > pg_restore_attribute_stats() do that, so that is actually not that > bad. Also, as you mentioned above, it's inefficient for the new API > functions to lock an already-locked relation, and validate an > already-validated attname/attnum, but I think it would be negligible. Fujita-san, is it then your plan to get those two patches committed? --=20 Robert Haas EDB: http://www.enterprisedb.com