X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 92577DAF05 for ; Wed, 26 Oct 2005 02:14:42 -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 54881-02 for ; Wed, 26 Oct 2005 05:14:40 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8759CDAF04 for ; Wed, 26 Oct 2005 02:14:40 -0300 (ADT) 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 j9Q5Ee08002124; Wed, 26 Oct 2005 01:14:40 -0400 (EDT) To: Kenneth Gonsalves Cc: PostgreSQL SQL Subject: Re: why vacuum In-reply-to: <200510261015.17623.lawgon@thenilgiris.com> References: <200510261015.17623.lawgon@thenilgiris.com> Comments: In-reply-to Kenneth Gonsalves message dated "Wed, 26 Oct 2005 10:15:17 +0530" Date: Wed, 26 Oct 2005 01:14:40 -0400 Message-ID: <2123.1130303680@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/306 X-Sequence-Number: 23159 Kenneth Gonsalves writes: > i was in a minor flame war with a mysql guy - his major grouse was that > 'I wouldnt commit mission critical data to a database that needs to be > vacuumed once a week'. This guy is not worth arguing with. > So why does pg need vacuum? Every database needs maintenance operations. PG is designed in a way that exposes the maintenance operations to the control of the DBA a bit more than most other DBMSes do: specifically, you get to decide when some of the overhead work happens. We think this is a feature, because you can schedule the overhead for low-activity periods (nights, weekends, whatever). In other DBMSes the equivalent work happens as part of foreground queries, no matter how time-critical they might be. Now, there's no doubt that for a database run by a non-expert person who can't even spell DBA, exposing this sort of knob isn't very helpful. So there's work afoot to provide automatic maintenance tools (ie, autovacuum). Over time I think autovacuum will get smart enough that even experts will usually use it. But that point will only be reached when autovacuum has some idea about doing more work during low-load periods. Unless MySQL invents some concept equivalent to VACUUM, they won't have any prayer at all of being able to shift maintenance overhead to low-load times. regards, tom lane