From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: documentation about explicit locking |
Date: | 2018-07-30 20:27:14 |
Message-ID: | 4643ae11-ef6e-e4be-e133-22885120bc59@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 19/07/2018 06:17, Amit Langote wrote:
> When playing with this, I observed that a less user-friendly error message
> is emitted if multiple sessions race to create the same collation.
>
> Session 1:
> begin;
> create collation collname (...);
>
> Session 2:
> create collation collname (...);
> <blocks for lock on pg_collation>
>
> Session 1:
> commit;
>
> Session 2:
> ERROR: duplicate key value violates unique constraint
> "pg_collation_name_enc_nsp_index"
> DETAIL: Key (collname, collencoding, collnamespace)=(collname, 6, 2200)
> already exists.
You get the same behavior with for example CREATE FUNCTION or CREATE
TYPE. I don't think we need to fix this specifically for CREATE COLLATION.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2018-07-30 20:33:21 | Re: Segfault logical replication PG 10.4 |
Previous Message | Peter Eisentraut | 2018-07-30 20:25:50 | Re: documentation about explicit locking |