X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 5C76B30D1B8 for ; Wed, 18 Jun 2003 12:52:41 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 40344-10 for ; Wed, 18 Jun 2003 09:52:30 -0300 (ADT) Received: from mail.electronicpartner.de (unknown [193.159.179.4]) by svr1.postgresql.org (Postfix) with ESMTP id 6BC1430D19C for ; Wed, 18 Jun 2003 09:52:30 -0300 (ADT) Received: by mail.electronicpartner.de (Postfix, from userid 504) id 104254402C; Wed, 18 Jun 2003 14:52:30 +0200 (CEST) Received: from epmail.ep.de (epmail.ep.de [122.1.8.180]) by mail.electronicpartner.de (Postfix) with ESMTP id C5A9444010 for ; Wed, 18 Jun 2003 14:52:29 +0200 (CEST) Received: from nt-visexcht.ep.de ([122.2.1.201]) by epmail.ep.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id OAA02829 for ; Wed, 18 Jun 2003 14:53:45 +0200 Received: by nt-visexcht.ep.de with Internet Mail Service (5.5.2653.19) id ; Wed, 18 Jun 2003 14:52:29 +0200 Message-ID: From: "Gaffga, Stefan" To: "'pgsql-admin@postgresql.org'" Subject: Plz help: PostgreSQL takes too much disk-space Date: Wed, 18 Jun 2003 14:56:00 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Archive-Number: 200306/217 X-Sequence-Number: 9208 Hello! We use the PostgreSQL Version 7.2.2 bundled with SuSE Linux 8.2 Professional. Our database server contains 20 databases, many smaller and some larger ones. 10 of these databases contain most of the data. These data need to be updated every day. We delete all rows of the each table using "delete from tab" and then we fill them again using the COPY-command. The data that we insert using the COPY command is converted from a text file we receive every evening. The complete operation takes about 1 hour. After we updated all of our tables, we do a "vacuumdb --all --full". Now the problem: We encountered that the database is growing far more rapidly than the data! Our database currently consumes 20GB (!) of disk space! The strange effect is: When we do a "pg_dumpall > db.dmp" and insert this dump into a clean DB-server environment, the consumed disk space is 2.1 GB!! So you see, that we do not have that much data to really fill anything around 20GB... When I do a "select sum(relpages) from pg_class where relname not like 'pg_%';" to get the used pages from all non-system tables the result is: 849034. As we did not change the block size, we get 849034 * 8k = 6792272 k = 6,5 GB Then for the system tables: "select sum(relpages) from pg_class where relname like 'pg_%';" The result is: 267 => 267 * 8k = 2 MB As you see, PostgreSQL thinks it is using 6,5 GB, but "du -sh" says 20GB ... Any help / hints / links / ideas are VERY appreciated! Thank you all in advance Stefan