X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A67BFD1C509 for ; Thu, 31 Jul 2003 08:52:15 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 35348-01 for ; Thu, 31 Jul 2003 05:51:13 -0300 (ADT) Received: from www.credativ.de (p50927668.dip.t-dialin.net [80.146.118.104]) by svr1.postgresql.org (Postfix) with ESMTP id 6C82FD1C4EC for ; Thu, 31 Jul 2003 05:52:13 -0300 (ADT) Received: from [172.26.14.239] (unknown [172.26.14.239]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by www.credativ.de (Postfix) with ESMTP id 6B4361C001A; Thu, 31 Jul 2003 10:52:12 +0200 (CEST) Date: Thu, 31 Jul 2003 11:01:24 +0200 (CEST) From: Peter Eisentraut X-X-Sender: peter@krusty.credativ.de To: pgboy@guthrie.charm.net Cc: mendola@bigfoot.com, pgsql-admin@postgresql.org Subject: Re: storage calculations In-Reply-To: <20030730114317.3F7E113E23@guthrie.charm.net> Message-ID: References: <20030730114317.3F7E113E23@guthrie.charm.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/353 X-Sequence-Number: 9693 pgboy@guthrie.charm.net writes: > sorry, when i referred to "disk space used" i meant the actual amount > used by live rows. if i insert 1000 rows then delete 999 of them, the > disk file will be the size of the 100 row container (make that 1000, not > 100 - i cannot backspace here) until i do a "vacuum full" - which does a > table lock, which is a bad thing. The task that you originally described was that you want to monitor when the disk is getting full. For that task, you need to take into account the actual size of the data on disk, not the size after a "vacuum full" which you say you do not want to execute. Basing a disk full monitor on hypothetical sizes sounds pretty useless. > given that, i'd like to try to be able to calculate the number of > bytes a row uses given its schema. i've seen this kind of > documentation for other dbs, i just cannot seem to find it > in the postgresql docs. There is some information about that in the FAQ, but keep in mind that rows may be compressed or moved to secondary storage automatically. -- Peter Eisentraut peter_e@gmx.net