Received: from mail.flutterby.com (www.flutterby.com [209.140.49.28]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2P2e3w43658 for ; Sat, 24 Mar 2001 21:40:04 -0500 (EST) (envelope-from danlyke@flutterby.com) Received: from wynand.flutterby.com (c1294852-a.marin1.sfba.home.com [65.11.14.11]) by mail.flutterby.com (8.9.3/8.9.3/Debian/GNU) with ESMTP id SAA31177 for ; Sat, 24 Mar 2001 18:44:10 -0800 Received: (from danlyke@localhost) by wynand.flutterby.com (8.9.3/8.9.3/Debian 8.9.3-21) id SAA00962; Sat, 24 Mar 2001 18:28:08 -0800 From: Dan Lyke MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15037.22456.492634.743275@wynand.flutterby.com> Date: Sat, 24 Mar 2001 18:28:08 -0800 (PST) To: pgsql-sql@postgresql.org Subject: Re: Serials. In-Reply-To: References: <20010324125750.906311A62@druid.net> X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-Archive-Number: 200103/485 X-Sequence-Number: 2156 Grant writes: > I have a message board. Where users can send each other messages. I > doubt I will ever get 2147483647 messages, but I want to make sure I > never get an error where the message isn't sent. Think about loads. If your users are going to be posting 10 messages/second, that's 864000 messages per day, you won't wrap for nearly 7 years. I've got a pretty heavy mail load, including spam I probably get 300 messages/day, weekends are lighter, so if you've got a bunch of weenies who are subscribed to a gazillion mailing lists you're talking three thousand users for six and a half years. A little light if you're planning on being the next Hotmail (A test account set up there gets 70 spams/day without my ever publishing the address), but for your average mid-range discussion forum you're probably good for a while. I doubt that, say, Salon's TableTalk forum gets even 10k new messages per day. > I guess the best option is to create a function that changes all the > ids to the lowest values possible and then set the sequence to the > maximum value + 1. Better idea, if one of your deletion criteria is going to be age, would just be to wrap the IDs. Dan