Re: Roll Back dont roll back counters

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ben-Nes Michael <miki(at)canaan(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Roll Back dont roll back counters
Date: 2001-08-16 11:14:40
Message-ID: 20010816211440.A17377@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2001-08-16 11:19:26 Re: Roll Back dont roll back counters
Previous Message newsreader 2001-08-16 10:16:21 Re: select distinct and order by