Re: [GENERAL] looking for a globally unique row ID - Mailing list pgsql-general

From George Neuner
Subject Re: [GENERAL] looking for a globally unique row ID
Date
Msg-id f3fmrc5hr9t73otbqdgq9g98r8ahhhhkpk@4ax.com
Whole thread Raw
In response to [GENERAL] looking for a globally unique row ID  (Rafal Pietrak <rafal@ztk-rp.eu>)
List pgsql-general
On Thu, 14 Sep 2017 17:02:05 -0500, Merlin Moncure
<mmoncure@gmail.com> wrote:

>... With sequences, the database *guarantees* that the
>identifier is unique with no exceptions; there never will be a unique
>value.  Can you give a hypothetical example of how you think they
>wouldn't work?

Jumping in here, but a month or so past someone here was complaining
about a restore resetting all the sequences in the database. Obviously
a strange situation [I've never seen it], but something to worry about
if you are relying on sequences for uniqueness.

Upthread I suggested the timestamp+counter approach.  I wasn't
thinking about this issue specifically, but it is immune to the
counter being reset [accidentally or otherwise].

George



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory
Next
From: milist ujang
Date:
Subject: Re: [GENERAL] BDR, near xid wraparound, a lot of files in pg_subtrans directory