From: Marc Howard Zuckman <marc@fallon.classyad.com>
To: Postgres DBA <postgres@nest.bistbn.com>
Cc: M Simms <grim@argh.demon.co.uk>
Cc: SQL Mailing List <pgsql-sql@postgreSQL.org>
Subject: Re: [SQL] abusing an aggregate funct
Date: Sun, 15 Nov 1998 11:04:26 -0500 (EST)
Message-ID: <Pine.LNX.4.02A.9811151101140.8582-100000@fallon.classyad.com> (raw)
In-Reply-To: <Pine.BSF.4.02.9811151643140.12790-100000@nest.bistbn.com>
On Sun, 15 Nov 1998, Postgres DBA wrote:
>
>
> On Sun, 15 Nov 1998, M Simms wrote:
>
> > > Unfortunately, solution using sequences is not so good unless you don't
> > > suppose to use access to that table from some simultaneously running
> > > sessions. The problem is that every sessions accessing this additional
> > > sequence with nextval() will get its own pool of values for the
> > > sequence, so early or later you'll get some gaps in records numbering
> > > because of at least on of two reasons:
> >
> > >From the manpage of create sequence
> >
> >
> > Low-level locking is used to enable multiple simultaneous
> > calls to a generator.
> >
> > Doesnt this mean it will work for this task?
> >
> >
>
> Sure, you can access one sequence from a couple of sessions at once but
> it the only thing is guaranteed is UNIQUENESS of values you get from
> nestval() across one sequence. Although nobody can promise you that there
> will no gaps... There are lots of reasons, I mentioned just some of them
> (see my previous posting in this thread)
>
> Aleksey
>
>
>
>
My understanding is that if you do not enable the cache feature
of the sequence, there will be no gaps. Of course, disabling the
cache slows the transaction.
Marc Zuckman
marc@fallon.classyad.com
_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
_ Visit The Home and Condo MarketPlace _
_ http://www.ClassyAd.com _
_ _
_ FREE basic property listings/advertisements and searches. _
_ _
_ Try our premium, yet inexpensive services for a real _
_ selling or buying edge! _
_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: marc@fallon.classyad.com, postgres@nest.bistbn.com, grim@argh.demon.co.uk
Subject: Re: [SQL] abusing an aggregate funct
In-Reply-To: <Pine.LNX.4.02A.9811151101140.8582-100000@fallon.classyad.com>
References: <Pine.BSF.4.02.9811151643140.12790-100000@nest.bistbn.com> <Pine.LNX.4.02A.9811151101140.8582-100000@fallon.classyad.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox