Re: Roll Back dont roll back counters - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Roll Back dont roll back counters
Date
Msg-id 20010816211440.A17377@svana.org
Whole thread Raw
In response to Roll Back dont roll back counters  ("Ben-Nes Michael" <miki@canaan.co.il>)
Responses Re: Roll Back dont roll back counters
List pgsql-general
On Thu, Aug 16, 2001 at 01:15:13PM +0300, Ben-Nes Michael wrote:
> If I design a table with SERIAL type and then try to insert few rows, but
> some of the rows are rolled back the roll back process does not roll back
> the counter status.
>
> Is there a way to do a roll back to the counter ?

Nope. You can use setval, but you have no guarentees.

Think about it. If you had to roll back the counter if the transaction
failed, you would lose concurrency. Every transaction would have to wait
until the previous one finished to find out what number it will get.

Why do people care about holes anyway? I've never understood that...

--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> It would be nice if someone came up with a certification system that
> actually separated those who can barely regurgitate what they crammed over
> the last few weeks from those who command secret ninja networking powers.

pgsql-general by date:

Previous
From: newsreader@mediaone.net
Date:
Subject: Re: select distinct and order by
Next
From: Gunnar Rønning
Date:
Subject: Re: Re: Re: Storing images in PG?