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

From Nico Heller
Subject Re: Guarantee order of batched pg_advisory_xact_lock
Date
Msg-id 71f6fa8c-de7b-4af0-a952-1bd4db4e3007@posteo.de
Whole thread Raw
In response to Re: Guarantee order of batched pg_advisory_xact_lock  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-general

For my case that is not true as our keys are globally unique URN strings. Thus, only the hashes may collide, but thank you for the insight.

On 2/12/26 15:47, Greg Sabino Mullane wrote:
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: Adrian Klaver
Date:
Subject: Re: Index (primary key) corrupt?
Next
From: Ron Johnson
Date:
Subject: pg_restore failed on foreign key constraint