X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DAE8C14B27FC for ; Wed, 11 Aug 2004 04:21:07 -0300 (ADT) 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 72190-09 for ; Wed, 11 Aug 2004 07:21:00 +0000 (GMT) Received: from mail.gmx.net (imap.gmx.net [213.165.64.20]) by svr1.postgresql.org (Postfix) with SMTP id C689414B2827 for ; Wed, 11 Aug 2004 04:20:58 -0300 (ADT) Received: (qmail 2134 invoked by uid 0); 11 Aug 2004 07:20:59 -0000 Received: from 82.82.214.56 by www53.gmx.net with HTTP; Wed, 11 Aug 2004 09:20:59 +0200 (MEST) Date: Wed, 11 Aug 2004 09:20:59 +0200 (MEST) From: "Ole Streicher" To: Tom Lane Cc: pgsql-jdbc@postgresql.org MIME-Version: 1.0 References: <29794.1092160326@sss.pgh.pa.us> Subject: Re: Cleaning up large objects X-Priority: 3 (Normal) X-Authenticated: #16178552 Message-ID: <13241.1092208859@www53.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/74 X-Sequence-Number: 10796 Hi Tom, > "Ole Streicher" writes: > To aggressively compact table files and return space to the OS, you need > vacuum full, which is a great deal slower and requires exclusive table > locks. OK; this freed the space while running for about four hours. > If you see space leakage in a database that should have a reasonably > constant total size, the reason is usually that you don't have the FSM > parameters set large enough to remember all the free space. Check your > settings in postgresql.conf and increase if needed. (Note that an > increase requires a postmaster restart to take effect.) What is a reasonable value for these settings in my case? I write about 5 MBytes per hour (measured by the decrease of free disk space over some time) to 157 LOBs (mostly by appending to existing LOBs), where the data remain for about three months. This makes about 11 Gigabytes of needed Disk space. But my disk went out of space at about 15 Gigabytes. I have still no idea which value to put there; the (commented out) line in the cfg file is #max_fsm_pages = 10000 # min 1000, fsm is free space map, ~6 bytes > You might also want to think about vacuuming more often than once a day, > so that space can be recycled into the FSM sooner. When you have a > periodic bulk delete process, it's not a bad idea to vacuum the table > that had the deletes immediately after each deletion run. My problem here is that vaccum takes always a few minutes (except in cases when the database was not touched at all), and during that time the system load is quite high. That disturbs the "normal" data storage processes on the same server. Is it possible to run the vacuum with a lower priority (while all other postgres queries keeping the normal priority)? It does not help just to decrease the priority of the vacuum command since it is the postmaster thread that makes the load and not the command script). Regards Ole -- NEU: WLAN-Router für 0,- EUR* - auch für DSL-Wechsler! GMX DSL = supergünstig & kabellos http://www.gmx.net/de/go/dsl