X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DDD323A61C8 for ; Thu, 13 Jan 2005 22:14:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 33074-10 for ; Thu, 13 Jan 2005 22:14:40 +0000 (GMT) Received: from smtp105.rog.mail.re2.yahoo.com (smtp105.rog.mail.re2.yahoo.com [206.190.36.83]) by svr1.postgresql.org (Postfix) with SMTP id 12C263A60CF for ; Thu, 13 Jan 2005 22:14:41 +0000 (GMT) Received: from unknown (HELO phlogiston.dydns.org) (a.sullivan@rogers.com@216.75.167.195 with login) by smtp105.rog.mail.re2.yahoo.com with SMTP; 13 Jan 2005 22:14:41 -0000 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 131F54035; Thu, 13 Jan 2005 17:14:40 -0500 (EST) Date: Thu, 13 Jan 2005 17:14:40 -0500 From: Andrew Sullivan To: "'pgsql-sql@postgresql.org'" Subject: Re: Column with recycled sequence value Message-ID: <20050113221440.GD31858@phlogiston.dyndns.org> Mail-Followup-To: "'pgsql-sql@postgresql.org'" References: <1105649326.24795.99.camel@state.g2switchworks.com> <20050113211903.GA41687@winnie.fuhr.org> <1105651913.24795.102.camel@state.g2switchworks.com> <20050113214349.GC31858@phlogiston.dyndns.org> <1105653424.24795.111.camel@state.g2switchworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1105653424.24795.111.camel@state.g2switchworks.com> User-Agent: Mutt/1.5.6+20040907i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.032 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/93 X-Sequence-Number: 19881 On Thu, Jan 13, 2005 at 03:57:04PM -0600, Scott Marlowe wrote: > What cases are you thinking of? I've seen some very limited ones, like Off the top of my head - legacy application, closed, where you can't fix the source and can't have larger than 32bit datatype, but you have another way to ensure no dups. - the queue-management item you mentioned. - optimistic cases where a short search range is more important than that a transaction doesn't fail on insert - circular number spaces (xid uses this, after all) > the time someone is thinking of doing so it's because a boss who doesn't > get it wants a pretty list with no holes in the sequence or something > equally silly. Like they have some business problem they need solved, and doing it this way is ugly but relatively cheap, and doing it the other way means replacing 4 software systems and retraining 100 people. Is it a pretty design? Probably not. Is it something that is, of all the compromises available, the best one under the circumstances? I dunno; I'd have to look at the circumstances. I think it's probably usually a good idea to avoid this, sure, but I'm not willing to make it a blanket statement. A -- Andrew Sullivan | ajs@crankycanuck.ca The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun