Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id A82AF9FCB68 for ; Fri, 26 Oct 2007 09:42:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 56783-02-3 for ; Fri, 26 Oct 2007 09:42:30 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.180]) by postgresql.org (Postfix) with ESMTP id 2EF859FCBA5 for ; Fri, 26 Oct 2007 09:41:38 -0300 (ADT) Received: by el-out-1112.google.com with SMTP id m34so282256ele for ; Fri, 26 Oct 2007 05:41:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=AOid1UJbn9PYsD+Ju8fdXQVHX/cwEIfgE1np9uAa5qE=; b=Qgi+vvKsgVD5r+KPm7DK7NdEvKVN/f60l9VC0XuMGWYHX9PdSNcTHZUC+pCxBAu885N6tQfPL2Cgk0ANffz9vWVp5cfokC/smpHh13+WgYzLHX3sBWQ74HtYdjll5o+J5ZYBbu2VWhL/i/TKMPDWIQZj+WTnS+wXvATCroXZgkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mT+1+4XW3Oj1lfjWawwHWdrdWxoNpTfGSwfHHi48Be13oX3BQ+1M9Dx2TuaF2mOOJyhh+nZfl/g4Mg04BJ+7HqgsgTUWqURHdXIn7+ewtyfaBlVPfzRMie93hBr4QBwyHvx6rhMKi03EfNeJmnHAozDvngRCw3WlxwYHyYYMHHE= Received: by 10.143.160.1 with SMTP id m1mr804588wfo.1193402496681; Fri, 26 Oct 2007 05:41:36 -0700 (PDT) Received: by 10.142.203.6 with HTTP; Fri, 26 Oct 2007 05:41:36 -0700 (PDT) Message-ID: Date: Fri, 26 Oct 2007 14:41:36 +0200 From: "Giulio Cesare Solaroli" To: "Tom Lane" Subject: Re: Finalizing commit taking very long Cc: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1302.1193231756@sss.pgh.pa.us> <2051.1193234616@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/295 X-Sequence-Number: 27317 Hello Tom, I can confirm that adding the indexes used by the deferred constraint triggers solved the issue. Thank you very much for your suggestions. Best regards, Giulio Cesare On 10/24/07, Giulio Cesare Solaroli wrote: > On 10/24/07, Tom Lane wrote: > > "Giulio Cesare Solaroli" writes: > > > How can I try to isolate the trigger taking so long, in oder to > > > understand which is/are the missing index(es)? > > > > Try SET CONSTRAINTS ALL IMMEDIATE and then EXPLAIN ANALYZE the > > delete. This should cause all the triggers to run within the > > scope of the EXPLAIN ANALYZE, and you'll be able to see which > > one(s) are slow. (This assumes you're running a recent release > > of PG; I think EXPLAIN shows trigger times since 8.1 or so.) > > I was thinking about something similar after writing the last message. > > Thank you very much for your attention!! > > Giulio Cesare >