Re: gen_random_uuid key collision - Mailing list pgsql-general

From Mark Dilger
Subject Re: gen_random_uuid key collision
Date
Msg-id 51C76F82-C22A-46CC-BB14-17487A954D2B@enterprisedb.com
Whole thread Raw
In response to gen_random_uuid key collision  (jesusthefrog <jesusthefrog@gmail.com>)
List pgsql-general

> On Sep 2, 2021, at 4:25 PM, jesusthefrog <jesusthefrog@gmail.com> wrote:
>
> Anyone have any thoughts on this?

I agree with Peter's suggestion upthread to run amcheck on the index, but if that comes back with no corruption, can
youverify that there are no rules or triggers that might cause multiple copies of the rows to be inserted?  Likewise,
canyou verify that you have no replication subscriptions that could be putting duplicates into the table? 

Another idea that seems unlikely given your lack of trouble with other tables is that you might check whether you have
anyfunctions that reset the seed for your random generator.  I haven't looked specifically at your uuid generator, and
Idon't know if it gets nondeterministic randomness from /dev/random or similar, but deterministic random generators can
bemade to produce the same sequence again if the seed it reset. 

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-general by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: gen_random_uuid key collision
Next
From: M Tarkeshwar Rao
Date:
Subject: is there any memory leak with postgres version(12.x) - https://stackoverflow.com/questions/3849543/force-postgresql-to-release-allocated-memory