Re: Equivalent for AUTOINCREMENT? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Equivalent for AUTOINCREMENT?
Date
Msg-id 49143889.2080609@postnewspapers.com.au
Whole thread Raw
In response to Re: Equivalent for AUTOINCREMENT?  (Michelle Konzack <linux4michelle@tamay-dogan.net>)
List pgsql-general
Michelle Konzack wrote:
> Halle Craig,
>
> Am 2008-11-05 20:37:31, schrieb Craig Ringer:
>> If you really, truly need gapless sequences, there are some options. I
>> posted about them recently on another thread. The archives will contain
>> that post and many others from many people on the same topic. Be aware,
>> though, that gapless sequences have some NASTY performance consequences.
>
> Since this "NASTY performance consequences" would only  hit  the  INSERT
> statement and it is very unlikely that I  have  concurence  WRITE/INSERT
> access, it is a minor problem.

And DELETE.

And anything that happens in the same transaction after the INSERT or
DELETE that touches the table with the gapless sequence.

It'll probably be OK if you keep the transactions that modify the table
with the gapless sequences as short as possible, preferably doing
nothing except the modification in question.

--
Craig Ringer

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Equivalent for AUTOINCREMENT?
Next
From: "Andrus"
Date:
Subject: avoiding seq scan without duplicating