X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 457D455478 for ; Mon, 7 Mar 2005 14:26:12 +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 70560-06 for ; Mon, 7 Mar 2005 14:26:10 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id E253F55056 for ; Mon, 7 Mar 2005 14:26:09 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j27EQB6O022915; Mon, 7 Mar 2005 09:26:12 -0500 (EST) To: "Pradeepkumar, Pyatalo (IE10)" Cc: pgsql-admin@postgresql.org Subject: Re: Help on maintaining pgsql/data folder size In-reply-to: <77ED2BF75D59D1439F90412CC5B109741A76E8AA@ie10-sahara.hiso.honeywell.com> References: <77ED2BF75D59D1439F90412CC5B109741A76E8AA@ie10-sahara.hiso.honeywell.com> Comments: In-reply-to "Pradeepkumar, Pyatalo (IE10)" message dated "Mon, 07 Mar 2005 00:08:14 -0700" Date: Mon, 07 Mar 2005 09:26:11 -0500 Message-ID: <22914.1110205571@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/81 X-Sequence-Number: 16579 "Pradeepkumar, Pyatalo (IE10)" writes: > I am using PostgreSQL 7.4.3. The problem I am facing is that the size of > pgsql/data folder keeps increasing and at a point the it takes up all the > disk space and it freezes the system. The pg_xlog and the pg_clog folders > are taking up most of the disk space. In the documentation, it says that I > have to move the pg_xlog folder to some other location and create a symbolic > link to that path from the original path. But the problem is for our > application, we are using a 512 MB compact flash and there is no > harddisk... pg_xlog shouldn't grow unreasonably big unless you've somehow turned off checkpointing. pg_clog shouldn't grow unreasonably big unless you've neglected appropriate vacuuming procedures (see the manual). So I think this is mostly pilot error. It might be worth your while to reduce the size of xlog segments --- if you have three or four 8M or 4M segments instead of three or four 16M segments, that makes a difference when you're trying to fit in 512M. It would require some fooling with the source code to make that happen in 7.4; you should consider moving to 8.0 where there's just one configuration #define to adjust. In general though I wonder whether you shouldn't have picked another database. PG isn't really designed for that sort of environment. Aside from the fact that we aren't targeting a tiny disk footprint, we expect to rewrite the WAL files again and again and again. What's the write-cycles lifetime spec for your flash? regards, tom lane