Re: looking for a globally unique row ID

From: George Neuner <gneuner2(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: looking for a globally unique row ID
Date: 2017-09-15 02:43:10
Message-ID: f3fmrc5hr9t73otbqdgq9g98r8ahhhhkpk@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 14 Sep 2017 17:02:05 -0500, Merlin Moncure
<mmoncure(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message milist ujang 2017-09-15 03:46:02 Re: BDR, near xid wraparound, a lot of files in pg_subtrans directory
Previous Message Craig Ringer 2017-09-15 02:36:51 Re: BDR, near xid wraparound, a lot of files in pg_subtrans directory