Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id DD70F9FB689 for ; Wed, 18 Jul 2007 12:46:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 97171-10 for ; Wed, 18 Jul 2007 12:46:02 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 6D8DB9FBAFC for ; Wed, 18 Jul 2007 12:46:02 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id d32so525058pye for ; Wed, 18 Jul 2007 08:46:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Crqo8HAcqB/V87lPqIWyDLvqeKjSshKmwTOUirOnUXNCCAMY5EqhsIx6rojnk3rWOzR046w+1Knf/h9MNKds6YwprddydVhyAjB8l28YT543vjIK02FUYQpvXJtoxzp12UxWXni6Pseva2WYUdeyrQ5Aelmlr+LjwZwhk2LoF8M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:reply-to:to:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=GUoumTLOiTuF7CDXhkXrDUHlSZ5FghirhHKnhNxWl5j6tgW1YQks/axADdQQCAJLHm72VkBCkgJTVMftcxLcTB41Ce3RVYxSKx6AOfltfe+K5XjvJ172udMP/VX1LThAU+ygXyBwGjOPkNNIvD7/ElOMPdsJdVW3kO+AAXS/iUs= Received: by 10.64.27.13 with SMTP id a13mr3020080qba.1184773561695; Wed, 18 Jul 2007 08:46:01 -0700 (PDT) Received: from ?192.168.1.107? ( [208.65.25.231]) by mx.google.com with ESMTPS id e15sm536697qbe.2007.07.18.08.46.00 (version=SSLv3 cipher=RC4-MD5); Wed, 18 Jul 2007 08:46:00 -0700 (PDT) Subject: Re: How to use a trigger to write rows to a remote server From: Adam Tauno Williams Reply-To: adamtaunowilliams@gmail.com To: postgres performance list In-Reply-To: <1184767332.10897.6.camel@coppola.muc.ecircle.de> References: <1184767332.10897.6.camel@coppola.muc.ecircle.de> Content-Type: text/plain Date: Wed, 18 Jul 2007 11:43:42 -0400 Message-Id: <1184773422.4263.12.camel@aleph.whitemice.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/216 X-Sequence-Number: 25900 On Wed, 2007-07-18 at 16:02 +0200, Csaba Nagy wrote: > On Wed, 2007-07-18 at 15:36, Michael Dengler wrote: > > Row X is inserted into TableX in DB1 on server1....TableX trigger > > function fires and contacts DB2 on server2 and inserts the row into > > TableY on server2. > This kind of problem is usually solved more robustly by inserting the > "change" into a local table and let the remote server (or some external If you don't want to build your own push/pull system [actually hard to do well] then use something like xmlBlaster or some other MOM. You get logging, transactions, and other features thrown in. http://www.xmlblaster.org/xmlBlaster/doc/requirements/contrib.replication.html -- Adam Tauno Williams, Network & Systems Administrator Consultant - http://www.whitemiceconsulting.com Developer - http://www.opengroupware.org