From: Mark Dilger <mark.dilger@enterprisedb.com>
To: jesusthefrog <jesusthefrog@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: gen_random_uuid key collision
Date: Thu, 2 Sep 2021 18:41:27 -0700
Message-ID: <51C76F82-C22A-46CC-BB14-17487A954D2B@enterprisedb.com> (raw)
In-Reply-To: <CAH_wARuGPc6xDLGLo4U1=gvuKvnKO3NVjwzkFef5sPETQ9-Hcg@mail.gmail.com>
References: <CAH_wARuGPc6xDLGLo4U1=gvuKvnKO3NVjwzkFef5sPETQ9-Hcg@mail.gmail.com>
> 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 you verify that there are no rules or triggers that might cause multiple copies of the rows to be inserted? Likewise, can you 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 any functions that reset the seed for your random generator. I haven't looked specifically at your uuid generator, and I don't know if it gets nondeterministic randomness from /dev/random or similar, but deterministic random generators can be made to produce the same sequence again if the seed it reset.
—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: mark.dilger@enterprisedb.com, jesusthefrog@gmail.com
Subject: Re: gen_random_uuid key collision
In-Reply-To: <51C76F82-C22A-46CC-BB14-17487A954D2B@enterprisedb.com>
References: <CAH_wARuGPc6xDLGLo4U1=gvuKvnKO3NVjwzkFef5sPETQ9-Hcg@mail.gmail.com> <51C76F82-C22A-46CC-BB14-17487A954D2B@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox