Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 57DA76501E6 for ; Tue, 12 Aug 2008 13:56:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21288-04 for ; Tue, 12 Aug 2008 13:56:33 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.154]) by postgresql.org (Postfix) with ESMTP id DC0EB64FCF4 for ; Tue, 12 Aug 2008 13:56:31 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so1983747fgg.23 for ; Tue, 12 Aug 2008 09:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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=Oewq/3le2AOCLTK4SBvSHejMjXuTRnOc+LHVNcSeOeI=; b=Asge0w8kNdF9KdQCb2QP0oOLpXB1tJINcO5oB2WFKZYg/mrQHYz2PiY7IeljeUJM9A jMMXPiK9nx2EDHhMaVch5/9r2EjSTIhUB7hxe6IJkUEx+bfGQ9dVB33tvy+e64TqfHIc rfI+NivUSE89J+WfFH4ihJ2VeJrjdmaqW4iX4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=AA+z6VMHQ0ygUIou4/HVaMrPKXfuUvF09sFo03IRN53Sh/+y2l4/awenO3GpludKy/ J7CwQw3pWVgX//NHmzbxcMQFhWou9augl8kMe8Gk+qhiLCPITsNAl4Gqjnw80waGSpYh MD6RnGSjnH+wmjVhGu+pSEzRJVmAG+GA0KUlQ= Received: by 10.86.94.11 with SMTP id r11mr10660717fgb.0.1218560189288; Tue, 12 Aug 2008 09:56:29 -0700 (PDT) Received: by 10.86.61.3 with HTTP; Tue, 12 Aug 2008 09:56:29 -0700 (PDT) Message-ID: Date: Tue, 12 Aug 2008 12:56:29 -0400 From: "Merlin Moncure" To: "Sabin Coanda" Subject: Re: long transaction 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: <120621.32315.qm@web59503.mail.ac4.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/133 X-Sequence-Number: 31014 On Tue, Aug 12, 2008 at 4:17 AM, Sabin Coanda wrote: >> long running transactions can be evil. is there a reason why this has >> to run in a single transaction? > > This single transaction is used to import new information in a database. I > need it because the database cannot be disconected from the users, and the > whole new data has to be consistently. There are different constraints that > are checked during the import. have you considered importing to a temporary 'holding' table with copy, then doing 'big' sql statements on it to check constraints, etc? merlin