| From: | Nico Heller <nico(dot)heller(at)posteo(dot)de> |
|---|---|
| To: | Greg Sabino Mullane <htamfids(at)gmail(dot)com> |
| 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 18:56:30 |
| Message-ID: | 71f6fa8c-de7b-4af0-a952-1bd4db4e3007@posteo.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(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
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron Johnson | 2026-02-12 21:35:09 | pg_restore failed on foreign key constraint |
| Previous Message | Adrian Klaver | 2026-02-12 16:25:28 | Re: Index (primary key) corrupt? |