Re: Guarantee order of batched pg_advisory_xact_lock

From: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
To: Nico Heller <nico(dot)heller(at)posteo(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Guarantee order of batched pg_advisory_xact_lock
Date: 2026-02-12 14:47:39
Message-ID: CAKAnmmKfV4K6CfMuQkfQxccP0JRC5orV1tmaq8pB_+EdCZS1yw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 12, 2026 at 6:18 AM Nico Heller <nico(dot)heller(at)posteo(dot)de> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-02-12 16:25:28 Re: Index (primary key) corrupt?
Previous Message Nico Heller 2026-02-12 11:18:34 Re: Guarantee order of batched pg_advisory_xact_lock