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 1vqXzN-00CsP1-37 for pgsql-general@arkaria.postgresql.org; Thu, 12 Feb 2026 14:48:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vqXzM-0093Ih-3B for pgsql-general@arkaria.postgresql.org; Thu, 12 Feb 2026 14:48: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.96) (envelope-from ) id 1vqXzM-0093IO-1w for pgsql-general@lists.postgresql.org; Thu, 12 Feb 2026 14:48:17 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vqXzK-00000000IYr-3imO for pgsql-general@postgresql.org; Thu, 12 Feb 2026 14:48:16 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-669287780f5so1201156eaf.1 for ; Thu, 12 Feb 2026 06:48:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770907695; cv=none; d=google.com; s=arc-20240605; b=IfLVav/JMCnPTy1d/HC8J0ipHDH9GeMYHpbw1dTDWB5OPJXgh58wEBkWAc2pgPYNcO /L0JqEwa5m4hvStgh2E+O14a5CyenbHCSlj3i0AXIbXGzxfMBPQ4BzkbvrGkqZsXzq6Q vJkVQDlCQorszzSizPM34s+SIgRSAnx865BhieqM9Sd4Tshi6JgV4fRt+Z0SA/dy2WUu kWcGvOykVfpAYAIvHp5Pv4+ONusptTG0F02gBgWojc3rBbTNxrsg01idaP48rYnqiV5O I/S3EAo5FoV6tnRT1eopaSFGv+WhuLfJ/u4rrhyI0lqdnsYDuTlzv+WOVdN3HzJUPm7r UtHQ== 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=mMZ79NH4MvKYIMA2XhwvkuppYonVaaGRt5jSSm5aF50=; fh=SAXJuWXiNv1GWi9HinUHoU4CYXneFjnDX3IZ0WypEiw=; b=BPFBuvGYbu4m84MPuvpMbsljMAoVKQ4yFmiaQH+PyiKHXOak5W/ZoRkm53lK0EcNZQ TuI7no81EXCra1H9hFbUoPFhCxTQ00HWKYEuWW8sL9RLuTDFMjp0eDqMe9SlsAAThdTH ScObVb5GGWB9e9uPHu1A7bqi3CfdN0On+A6prRlzVe/X//YGjxW9N8YrW/64AHdbVM8S n1DtN33Im/1YN3pCnOUEAgqARe7Vvbv56J+oLEZYc0Cs630fSPX2ImDRkUWXcCADljjF IddmuNZMoezDdx2KvSWJQKjB8VqklxsJWTSPZfOs4sRuX1YgAYVLDoFCvt31UGiJhZ4u MujQ==; 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=20230601; t=1770907695; x=1771512495; darn=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=mMZ79NH4MvKYIMA2XhwvkuppYonVaaGRt5jSSm5aF50=; b=dy6kkcekOW6lr5GctyRxUxiVzkJ7S9YW+YEJ5CAQLpd5HrqSNw0b3W6qptChHomCJh nYQuAxax0acBw4UyH2jJUvOVBOcX2qQmcNNE3jmh+et1fC1HkPZHxv1Qg0Rufk4b5aX+ YuO4qXdFzA14zv69UojfuDiLrp4qMw3yKrz43RwTgCYNRrRlHmhVIQogx3MSMudR9e81 b1lBPyoPDBv2FzDD0uWpj8tD2iOqAmQujVvxVfiJQ4pNRyi+K2KYdB7TIjb84FQiHZPr SuqpQvHe6X25yuNO8Eq0vgO0/AZsaHE3XQ9V264nU8n3YzpkrrWdGQDZt9scJIJouEYs YPRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770907695; x=1771512495; 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=mMZ79NH4MvKYIMA2XhwvkuppYonVaaGRt5jSSm5aF50=; b=PTlxyzOC/YY1NpKDX0AJuxC6qOQsnTuE+7mh7ANjFGayP86LWAhfcQ3imw6650a3Wz LR2JFNldMVMrZ4Z6l7xTBbQbfkEEqWhOdNXosAqfXgT6HEtF7EWJvKlssZ2p0ZNUa/EU tc9AFWjAPMFGcWxoDacWQnwBekAFwugtrMxDoCjReKaUhs9TZiT705D1GNm4aB82G8tw W7ictrb7aeq+edcUgd52XgyiZVFK6utjqQf68q+I+/xRQfvbaS8b1tZeC/qgrX5EzNBu auzmLLB4qDp7qXD0cx93hgTo17dMlH56wZAX1pEp7/JrKYgV9tQT4m+XOOx/5q7t5bjh bjTQ== X-Forwarded-Encrypted: i=1; AJvYcCUjxGRgU0QlouqJDNx2XQ/LCwng0+zNdhoV3YVaxWBVz6nxJl6t8XadGPc+LNxuxU0MeOsrTi8Wj1qBtSu2@postgresql.org X-Gm-Message-State: AOJu0YxXQiKttWqZHJ9iHV4W6xqRKVlzu0UooHKtshLd7GOcOzwrmqPY F2ncKZqFsS69RsNS9qoVaYN2R4x6hUnPekv7hYCgQj3e0WTQa4NkgrXQhpShjtrZuJU2HG8/359 +ztI6HM8nuKHM1cipD/toQJ2CzP7F6Oo= X-Gm-Gg: AZuq6aIJJCIUR825Ku+dL4GGHYUBv7ovsy9HmtJcrptYNDgP3aM0Z31FHA1bz7uIdGt uvTMXHI7NY6G2uhJqV97FLhxKM+9w8z5ojjvl9hfqb4FWcL47vR6bXtuJFetu7uqw6PgnkbStH1 WqNe8FCP9xHZo9+zIvnDIhDK3Qdb79Ci3TNLjV0T/AxmdcgoB7w0SSgDrh+mr5hrNGc2sZtdMM3 vO7b+PMPVNQMUUfvNbqSXnQPBk5jHlvVdoT7s5tSvgql2MqwJAot01Modg5758urTMh8ItSvuVb ElLDVK3miwmFP+5DyJC+tNUjt+fDw4IiHSI7U5TteQ== X-Received: by 2002:a05:6820:810:b0:673:efed:4d99 with SMTP id 006d021491bc7-675b2aff43cmr1269142eaf.33.1770907694821; Thu, 12 Feb 2026 06:48:14 -0800 (PST) MIME-Version: 1.0 References: <93fb937f-9f4d-4bd7-b7e6-51d5f98859d9@posteo.de> <14506.1770844674@sss.pgh.pa.us> <101916.1770850197@sss.pgh.pa.us> <777cfa1c-fd1f-479f-b9b8-217b0f7a40b7@posteo.de> In-Reply-To: <777cfa1c-fd1f-479f-b9b8-217b0f7a40b7@posteo.de> From: Greg Sabino Mullane Date: Thu, 12 Feb 2026 09:47:39 -0500 X-Gm-Features: AZwV_QhrktjqKj9ubXWocyYjl9cRpL1NnnyvuNFA6aUpXj91KlKprnIVAOkwThA Message-ID: Subject: Re: Guarantee order of batched pg_advisory_xact_lock To: Nico Heller Cc: Tom Lane , pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="0000000000001476dd064aa194d4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001476dd064aa194d4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 12, 2026 at 6:18=E2=80=AFAM Nico Heller = wrote: > I just checked for hash collisions with the following query today: > > SELECT COUNT(*), hashtextextended(key, 0) FROM > ( > SELECT key FROM table1 > UNION > FWIW, you need UNION ALL, not UNION, if you are trying to detect duplicate values (hashed or not) across tables. Cheers, Greg --0000000000001476dd064aa194d4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Feb 12, 2026 at 6:18=E2=80=AFAM N= ico Heller <nico.heller@posteo.= de> wrote:
=20 =20 =20

I just checked for hash collisions with the following query today:

SELECT COUNT(*), hashtextextended(key, 0) FROM
(
=C2=A0 SELECT key FROM table1
=C2=A0 UNION=C2=A0

=C2=A0
FWIW, = you need UNION ALL, not UNION, if you are trying to detect duplicate values= (hashed or not) across tables.

Cheers,
= Greg

--0000000000001476dd064aa194d4--