X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx2.hub.org [200.46.204.254]) by postgresql.org (Postfix) with ESMTP id 8008511F6212 for ; Fri, 14 Apr 2006 09:00:58 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.217 X-Spam-Level: * X-Spam-Status: No, score=1.217 required=5 tests=[BAYES_00=-2.599, SPF_HELO_SOFTFAIL=2.432, SPF_SOFTFAIL=1.384] Received: from postgresql.org ([200.46.204.71]) by localhost (mx2.hub.org [200.46.204.254]) (amavisd-new, port 10024) with ESMTP id 5VQGlwJUT-jQ for ; Fri, 14 Apr 2006 09:00:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mercure.sigma.fr (mercure.sigma.fr [195.25.81.9]) by postgresql.org (Postfix) with ESMTP id 8140F11F68DD for ; Fri, 14 Apr 2006 09:00:40 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mercure.sigma.fr (Postfix) with ESMTP id 70D0C1649F; Fri, 14 Apr 2006 14:00:39 +0200 (CEST) Received: from mercure.sigma.fr ([127.0.0.1]) by localhost (mercure-1 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09341-01; Fri, 14 Apr 2006 14:00:39 +0200 (CEST) Received: from marc.sigma.fr (marc [89.195.0.5]) by mercure.sigma.fr (Postfix) with ESMTP id 41D90163DE; Fri, 14 Apr 2006 14:00:39 +0200 (CEST) From: Marc Cousin Organization: Sigma Informatique To: "Francisco Reyes" Subject: Re: Inserts optimization? Date: Fri, 14 Apr 2006 14:00:38 +0200 User-Agent: KMail/1.9.1 Cc: "Chris" , "Pgsql performance" References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200604141400.38982.mcousin@sigma.fr> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at sigma.fr X-Archive-Number: 200604/330 X-Sequence-Number: 18414 I hope I'm not going to say stupid things, but here's what i know (or i think i know :) ) about bacula + postgresql If I remember correctly (I allready discussed this with Kern Sibbald a while ago), bacula does each insert in its own transaction : that's how the program is done, and of course it works ok with mysql and MyIsam tables, as mysql doesn't have transactions with myisam... So, you'll probably end up being slowed down by WAL fsyncs ... and you won't have a lot of solutions. Maybe you should start with trying to set fsync=no as a test to confirm that (you should have a lot of iowaits right now if you haven't disabled fsync). For now, I only could get good performance with bacula and postgresql when disabling fsync... On Thursday 13 April 2006 20:45, Francisco Reyes wrote: > Chris writes: > > If you can, use copy instead: > > http://www.postgresql.org/docs/8.1/interactive/sql-copy.html > > I am familiar with copy. > Can't use it in this scenario. > > The data is coming from a program called Bacula (Backup server). > It is not static data. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster