Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAGH33m35522 for ; Fri, 16 Nov 2001 12:03:03 -0500 (EST) (envelope-from reedstrm@rice.edu) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id E1F1268A5B for ; Fri, 16 Nov 2001 11:03:07 -0600 (CST) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 36D9668A1D for ; Fri, 16 Nov 2001 11:03:07 -0600 (CST) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 164mOR-00020A-00 for ; Fri, 16 Nov 2001 11:03:07 -0600 Date: Fri, 16 Nov 2001 11:03:07 -0600 From: "Ross J. Reedstrom" To: pgsql-sql@postgresql.org Subject: Re: INSERT question Message-ID: <20011116110306.A7689@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , pgsql-sql@postgresql.org References: <1f5f2b44.0111130130.17e8e57a@posting.google.com> <3bf19679$0$189$e4fe514c@newszilla.xs4all.nl> <878zd7vpzn.fsf@npa01zz001.simplot.com> <87y9l7u3k5.fsf@npa01zz001.simplot.com> <20011115160902.E4187@rice.edu> <87lmh6u02k.fsf@npa01zz001.simplot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87lmh6u02k.fsf@npa01zz001.simplot.com> User-Agent: Mutt/1.3.18i X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200111/247 X-Sequence-Number: 5629 No apologies necessary: if anything, _I_ was the one getting a little too gruff. In fact, _this_ time we did uncover a new aspect of this problem: connection pooling can get in the way. Ross On Fri, Nov 16, 2001 at 09:56:03AM -0700, Jason Earl wrote: > > Thanks for being patient with me. I must have fallen on my head > yesterday or something. I *knew* currval and nextval were backend > specific. I got confused because I am working on a middleware layer > with a connection pool that grabs a connection and holds it until the > transaction is finished. Each new transaction might grab a different > backend, but you won't get a new backend until your transaction is > finished. > > In other words, in my application the easiest way to insure that > currval and nextval work like they should is to start a transaction > (which grabs a backend connection). > > Apparently this has led to some very fuzzy thinking on my part. My > apologies for sending contradictory and confusing posts to the list, > and thanks for clearing that up. > > Jason