Received: from webster.conprojan.com.au (raw130515-1.gw.connect.com.au [202.21.11.98]) by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2Q05tw82305 for ; Sun, 25 Mar 2001 19:05:58 -0500 (EST) (envelope-from grant@conprojan.com.au) Received: (qmail 29658 invoked by uid 523); 25 Mar 2001 23:58:57 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 25 Mar 2001 23:58:57 -0000 Date: Mon, 26 Mar 2001 09:58:57 +1000 (EST) From: Grant To: Dan Lyke cc: pgsql-sql@postgresql.org Subject: Re: Serials. In-Reply-To: <15037.22456.492634.743275@wynand.flutterby.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200103/499 X-Sequence-Number: 2170 > 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 understand what you're saying. However it's not the amount of messages per day. I have cycle set on the sequence so that when it reaches the limit it will start back at 1 again. If however some users still have messages in their accounts that have used random ids from 1 onwards postgresql will produce the error that it's trying to insert a duplicate id that already exists, so in theory I want the system to run for infinity. I hope this makes sense. Thankyou for your time.