Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2FA6D650ED3 for ; Thu, 3 Jul 2008 09:54:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55694-01 for ; Thu, 3 Jul 2008 09:53:51 -0300 (ADT) X-Greylist: delayed 00:06:40.808583 by SQLgrey-1.7.6 Received: from 42.mail-out.ovh.net (42.mail-out.ovh.net [213.251.189.42]) by postgresql.org (Postfix) with SMTP id 2936F64FD64 for ; Thu, 3 Jul 2008 09:53:55 -0300 (ADT) Received: (qmail 18180 invoked by uid 503); 3 Jul 2008 12:47:02 -0000 Received: from gw2.ovh.net (HELO mail194.ha.ovh.net) (213.251.189.202) by 42.mail-out.ovh.net with SMTP; 3 Jul 2008 12:47:02 -0000 Received: from b0.ovh.net (HELO queue-out) (213.186.33.50) by b0.ovh.net with SMTP; 3 Jul 2008 12:47:13 -0000 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO apollo13.peufeu.com) (88.161.102.87) by ns0.ovh.net with SMTP; 3 Jul 2008 12:47:12 -0000 Date: Thu, 03 Jul 2008 14:56:27 +0200 To: =?utf-8?Q?Lev=C3=AD_Teodoro_da_Silva?= , "pgsql-performance@postgresql.org" Subject: Re: [QUESTION]Concurrent Access From: PFC Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <4a74ba520807021131l28308633yf0ad5416a7055f9@mail.gmail.com> Content-Transfer-Encoding: Quoted-Printable Message-ID: In-Reply-To: <4a74ba520807021131l28308633yf0ad5416a7055f9@mail.gmail.com> User-Agent: Opera Mail/9.24 (Linux) X-Ovh-Tracer-Id: 14578151995549157115 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|H 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.629 tagged_above=0 required=5 tests=AWL=0.629 X-Spam-Level: X-Archive-Number: 200807/40 X-Sequence-Number: 30640 > I want to know if the PostGree has limitations about the concurrent = > access, > because a lot of people will access this database at the same time. PostgreSQL has excellent concurrency provided you use it correctly. But what do you mean by concurrent access ? * Number of opened Postgres connections at the same time ? =3D> each one of those uses a little bit of RAM. (see manual) but if id= le = they don't use CPU. * Number of opened transactions at the same time ? (between BEGIN and COMMIT) If your transactions are long and you have many transactions at the sam= e = time you can get lock problems, for instance transaction A updates row X= = and transaction B updates the same row X, one will have to wait for the = = other to commit or rollback of course. If your transactions last 1 ms = there is no problem, if they last 5 minutes you will suffer. * Number of queries executing at the same time ? This is different from above, each query will eat some CPU and IO = resources, and memory too. * Number of concurrent HTTP connections to your website ? If you have a website, you will probably use some form of connection = pooling, or lighttpd/fastcgi, or a proxy, whatever, so the number of ope= n = database connections at the same time won't be that high. Unless you use= = mod_php without connection pooling, in that case it will suck of course,= = but that's normal. * Number of people using your client ? See number of idle connections above. Or use connection pool. > I want to know about the limitations, like how much memory do i have t= o = > use That depends on what you want to do ;) > How big could be my database ? That depends on what you do with it ;) Working set size is more relevant than total database size. For instance if your database contains orders from the last 10 years, b= ut = only current orders (say orders from this month) are accessed all the = time, with old orders being rarely accessed, you want the last 1-2 month= s' = worth of orders to fit in RAM for fast access (caching) but you don't ne= ed = RAM to fit your entire database. So, think about working sets not total sizes. And there is no limit on the table size (well, there is, but you'll nev= er = hit it). People have terabytes in postgres and it seems to work ;)