Re: Advice on Contiguous IDs - Mailing list pgsql-docs

From Alvaro Herrera
Subject Re: Advice on Contiguous IDs
Date
Msg-id 20180109164735.ic7pmtxehekv7paf@alvherre.pgsql
Whole thread Raw
In response to Advice on Contiguous IDs  ("Brian McKiernan" <brian.mckiernan@firstcircle.com>)
List pgsql-docs
Brian McKiernan wrote:

> My Issue:
> My primary keys in a certain table are not contiguous.

If you have a need to have values that are contiguous, you need to ask
yourself why and then see what mechanism provides the semantics you
need.  An easy way is to lock the table containing the column, for
example, which of course means only one transaction can do it at a time.
For many use cases this is good enough.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Describe UNION's cast on derived table
Next
From: Vik Fearing
Date:
Subject: Re: libpq options