Re: Guarantee order of batched pg_advisory_xact_lock - Mailing list pgsql-general

From Greg Sabino Mullane
Subject Re: Guarantee order of batched pg_advisory_xact_lock
Date
Msg-id CAKAnmmKfV4K6CfMuQkfQxccP0JRC5orV1tmaq8pB_+EdCZS1yw@mail.gmail.com
Whole thread Raw
In response to Re: Guarantee order of batched pg_advisory_xact_lock  (Nico Heller <nico.heller@posteo.de>)
Responses Re: Guarantee order of batched pg_advisory_xact_lock
List pgsql-general
On Thu, Feb 12, 2026 at 6:18 AM Nico Heller <nico.heller@posteo.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

pgsql-general by date:

Previous
From: Nico Heller
Date:
Subject: Re: Guarantee order of batched pg_advisory_xact_lock
Next
From: Adrian Klaver
Date:
Subject: Re: Index (primary key) corrupt?