X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id ECD8DCCBAB for ; Fri, 18 Jul 2003 02:35:16 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 98201-01 for ; Fri, 18 Jul 2003 02:35:16 +0000 (GMT) Received: from out006.verizon.net (out006pub.verizon.net [206.46.170.106]) by svr1.postgresql.org (Postfix) with ESMTP id 9B008CCACE for ; Thu, 17 Jul 2003 23:34:49 -0300 (ADT) Received: from RavChaim ([162.83.139.124]) by out006.verizon.net (InterMail vM.5.01.05.33 201-253-122-126-133-20030313) with ESMTP id <20030718023520.GWAS16647.out006.verizon.net@RavChaim> for ; Thu, 17 Jul 2003 21:35:20 -0500 Content-Type: text/plain; charset="us-ascii" From: mlaks To: pgsql-admin@postgresql.org Subject: Database growth problem Date: Thu, 17 Jul 2003 22:32:24 -0400 User-Agent: KMail/1.4.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200307172232.24024.mlaks@bellatlantic.net> X-Authentication-Info: Submitted using SMTP AUTH at out006.verizon.net from [162.83.139.124] at Thu, 17 Jul 2003 21:35:20 -0500 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/159 X-Sequence-Number: 9499 Hi, I have about 15 different PC's running RedHat 7.3 Linux, each running the= =20 same database backed application (I use Postgresql 7.2.1 for the database)= =20 on each machine.=20 The application essentially stores files on each of the PC's and the databa= se=20 on each machine stores information relevant to the files that are stored on= =20 that machine.=20 The files themselves are stored on a RAID on each PC, around 300 GB in size= .=20 As each file is about .5MB in size, thus about 600,000 files are stored and= =20 managed by the Postgresql database on each machine. I note that the databas= e=20 is about 1GB in size on each of the machines. I am constantly receiving new files, and as the PC's fill with files, I sim= ply=20 add additonal PC to my farm of PC's.=20 These databases therefore never have any data deleted from the databases. = I=20 just add files, and corresponding database entries each day, until I fill t= he=20 machine with files. I run vacuum analyze on these databases about 3 times a= =20 day.=20 I also keep one machine slightly different than the others.=20 On this machine, as a backup to the other machines, instead of just storing= =20=20 files without deleting, I use a scheme that stores new files as they come i= n=20 but also deletes the oldest files from the RAID and also deletes the=20 corresponding entries describing those entries from the database. I use thi= s=20 machine as an element of redundancy to recent files on the other machines. On this system, I keep the RAID about 75% full of files, and thus I imagine= =20 that the Postgresql database should be about .75 of a GB in size. However, = it=20 isnt! I find that it keeps growing as time goes on. Its now about 3.9GB in= =20 size!=20 In fact, I just had to move the database to another partition on my system= =20 disk, because it filled the var partition! But I run vaccuum analyze at the same frequency as on the PC's? How is it t= hat=20 deleting and saving and vacuum analyze doesnt keep it at a normal svelte <1= Gb=20 in size? What should I do to shrink it back down to its normal svelte shape? Thanks, Mitchell This way I have redundant copies of the most recent files that were stored = on=20 the other machines.