Re: Best approach for a "gap-less" sequence

From: AgentM <agentm(at)themactionfaction(dot)com>
To: PostgreSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Best approach for a "gap-less" sequence
Date: 2006-08-17 15:25:04
Message-ID: F4725942-60DF-4C06-A1F4-E9FC313CDDBF@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just in case no one else has brought it up- 8.1+ supports 2PC and
savepoints, so one alternative would be to run your standard
insertion operations in a prepared transaction or savepoint block. If
you get so far as being able to prepare the transaction/complete the
savepoint block, you should be able to snag a sequence id and commit
everything.

-M

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Harald Armin Massa 2006-08-17 15:40:08 PostgreSQL getting slower over time, restart of service cures the problem
Previous Message Kevin Murphy 2006-08-17 15:01:31 Re: COLLATE