Skip site navigation (1) Skip section navigation (2)

Re: Questions about SERIAL type

From: Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>
To: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org, Doug McNaught <doug(at)wireboard(dot)com>
Subject: Re: Questions about SERIAL type
Date: 2001-11-28 23:37:50
Message-ID: XFMail.20011128163750.ned.wolpert@knowledgenet.com (view raw or flat)
Thread:
Lists: pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 28-Nov-2001 G. Anthony Reina wrote:
> However, perhaps the other thing to do is to not increment the SERIAL value
> on an aborted transaction. I'm not sure why serial has to be incremented if
> the transaction fails. Of course, this won't take care of unused SERIAL
> numbers when DELETEs occur.

I thought its incremented since the sequence is outside of the transaction. 
That way, if multiple clients are doing inserts using the sequence, one
doesn't have to wait for the other transactions to end before they get a lock
on the sequence.


Virtually, 
Ned Wolpert <ned(dot)wolpert(at)knowledgenet(dot)com>

D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8BXVOiysnOdCML0URApJnAJ9Z43xFgJRevgoNIQEGYkwkxbAAJACbBopF
N3slqHoAxPq7HkcDaI7FMsY=
=r9mw
-----END PGP SIGNATURE-----

In response to

pgsql-hackers by date

Next:From: Doug McNaughtDate: 2001-11-28 23:38:54
Subject: Re: Questions about SERIAL type
Previous:From: Stephan SzaboDate: 2001-11-28 23:14:31
Subject: Re: Questions about SERIAL type

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group