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.98.2) (envelope-from ) id 1x9sId-00000002HV9-0rYn for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2026 22:52:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x9sIb-0000000FE0I-2HA2 for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Sep 2026 22:52:17 +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.98.2) (envelope-from ) id 1x9sIa-0000000FE07-2ZFi for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2026 22:52:17 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x9sIX-000000016ZB-3GNT for pgsql-bugs@lists.postgresql.org; Thu, 24 Sep 2026 22:52:15 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id F2CCDEC0139; Thu, 24 Sep 2026 18:52:12 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 24 Sep 2026 18:52:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1790290332; x=1790376732; bh=LT0bj35YDJ 4tVuUHwqx1tS0E3oPimsjXqhYZFvpaXEY=; b=ivNQwLudYsJZ3IOT3BIi4C/FsS pkXSS+T1lfLtETu1vuBE+AhM2cirbcH8y7xRGpDo6zc6Xf/0bGK6oEujyYD9HyY9 /r7Ytw+oZu5DpzXciHcvvYEKCZSY1uyvOC6SPyPOkrguAws+RN8639A+0l22xObC Gx8O9IOp1hDbrMV8wXWCu2rh3wMZOTamVz39/clLjy8v8GdC9Ylxn/z9e/M88tMg SeMAlDqo46bdo4wL9XJxYJO0MVQLOczvhjm86vWa+BnlgVMALlMFzjxP8NefdSYZ w30b1hULkWgEH4ZfppywU7v7JGVQbjOOLV23aOp0xIJX2HjHUZUAV1Ps8lBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1790290332; x=1790376732; bh=LT0bj35YDJ4tVuUHwqx1tS0E3oPimsjXqhY ZFvpaXEY=; b=A3WcDBqIxyi9F9XjEyzr3XQmpTrsPYsnGEIB9uBo5FeN7l0mmox 7xgnEIesb4VNPo9qbP/udTuVpvtef4TEUFpI6urT1CfnislZdyGp/jXnnIE89zH1 29U9EYn0hhGB25koHwvj6RbVT8NPbGNNkD5xc/5326AWd/lytcNgS+LhfZyeUMvV 6zAlPTzpnNqKsQFUOaKX9gQNR0p0trpjp5H01GXmXY3bZa5TSlL3+DkO9hP06uDH DB1YbVRZx3xZ9se1C/FuoRXVPbzIKtn0jBu3RHeSwYa07S7XhChwJbRFOUdMWe2v lCb+GAIpgriss9tb3KPtjfX4FIU0U16eXDw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFMTWZZ1tFwhljlfJ6CGMFK+dHMM5NfifcqfNVxvNASVJlRXCBd2trJG4b7RCeLAk mIAgaabG1xpPtN4t3gq3heHEwG77nwGymTlhf/1Z69ZtmY3L5wREeImjDWalnvudVe6J0c /WhRkoWWrRmZKE4sYqJhWA6NfWDWOU14JC3HDrUVGHcnPvr1cfPw9Aut/k44YgPZ4e4wK3 Gwgo7yQHN0iQcU050MF/ANk2bA/3ZvzECLcOTnoWs2oERRUhE3fa3/O5YC4Whe5cDKrd79 2R/9u3gFAJbIfx2qGr9OmDV7jSS/N19JWFL07kY68ItJY9AGPWKu2fa/bZDtH6ZHVLAiNH 4W1SNR4O34Kiju5bzqytQQBhVZ56Ib1oK1wK6IQs8h1MkhfyT7tmLcn8xQGmVtbpCEuOkm OSTOBFt4Qd/Z3/Q1Fy+nPUzQTcphULF9yPaSJV/D9RxY73GntK/hQ+/tFM/lSG9I66p9fS jNDnPZyxFWOPy7n4dSwzSXDTz6xAFpUDEa9QXQ5qpTeTeUxq4/mPIpNsCWQJoLo/EijUwi 2rjs4uar3KLsxIyKOCnspBztMJ+GGz/gh5kEfZ/h6a0a5nTWDHlKvN0rmem/ESZex4uChT MX1Ksof3GWtyI4USHvz+rjQZ513f2wEcc/A1vqNfZuOTXKUp15jIjSl9k0sw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Sep 2026 18:52:11 -0400 (EDT) Date: Fri, 25 Sep 2026 07:52:07 +0900 From: Michael Paquier To: jian he Cc: Corey Huinker , imchifan@163.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19715: pg_restore_attribute_stats() rejects range statistics for a domain over int4multirange Message-ID: References: <19715-b8be35083016f289@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IurGZ7S5WzgE4qwc" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --IurGZ7S5WzgE4qwc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 24, 2026 at 02:44:19PM +0800, jian he wrote: > Similar in import_pg_statistic. > change to > typcache =3D lookup_type_cache(typid, TYPECACHE_LT_OPR | > TYPECACHE_EQ_OPR | TYPECACHE_DOMAIN_BASE_INFO); >=20 > Disclaimer: Since I saw both of you actively working on this issue, I > haven't tried this myself. Yes, I was wondering about that a bit, feeding a single typcache entry across the board. And while looking at the code, I was reminded about the following exceptions: extended_stats_funcs.c: if (typid =3D=3D TSVECTOROID) stat_utils.c: if (*atttypid =3D=3D TSVECTOROID) stat_utils.c: if (atttypid =3D=3D TSVECTOROID)=20 I think that the existing code is also broken when defining a domain over tsvector if we don't feed a domain base type in these three spots. -- Michael --IurGZ7S5WzgE4qwc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmq1qZcACgkQnvQgOdby QH30lA/+N00IF3zqmIdN5L2ZbnCempYV5/AkyFp8BgprtceepOHgP/LOvovd7bel h8yWk8C8L5ToW2iKMIsshkfyRNKYjAdAFPG0C7bfj3ZIABIqCaiF4KPVLrvxvxz4 pAJaAZTEi/B0g5hfc7wCGsRCi303fVqO8debi3UktM7gGfK4bSXBeNEIYUxeW8Vr udAXKb4/y2gOb4T5z0WB51ardWTYqIrah36W3aE9X/5AdQhG2tksj3W8S+r9Orvz yvVB0FzHkz1EpWlKgbk99jz2jz2jqwnim5SegbE1R9LvYo/4Kp+5PwBOqYJx6Dbz 1K3TonskZyF90KJ3Z2BCJ223TEeOaTeerbc7w8AbftYldOOW/+sbxILDsmHUTr09 5F8CQmpOodZJKMqARSOZEfN9HxaP2Y22vXOCk3bY4lc7jNnQ7H1eKb/5r1b79GEm GCcw+6QstNu6pBukJjKkbgiylPHp8cpBqaRMpEJZDCYSxxnbn+pz62cCpLHKR7ev IYQxyg+OK74Y65Xblc2eUZfVXB/mAbmCy+b3XlfHdSqSsVb3pQqCZCnkBlR6bOqK ZT/9WBubTTqd/wQEu8RLxqoysahLF8aL33RmFSDxPnSqb0Bgt7+kGRY1Fo6r2vmV sPlm10HQBo4rBcZPQgyXoAKW8U+Fg2zLV9pZFF91THqm6BZvBHM= =A7rv -----END PGP SIGNATURE----- --IurGZ7S5WzgE4qwc--