Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id DDA2E9FB26B for ; Fri, 27 Jul 2007 15:27:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 55832-03 for ; Fri, 27 Jul 2007 15:27:00 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by postgresql.org (Postfix) with ESMTP id D9A489FB250 for ; Fri, 27 Jul 2007 15:27:01 -0300 (ADT) Received: by wr-out-0506.google.com with SMTP id 68so569387wri for ; Fri, 27 Jul 2007 11:27:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; 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; b=qtKnWH6FxCm+08SfzMb1rNdkJ+EEZzjshQAo7htQ/xemIj5u5Pm7tugLtIA51bOdERF6vJ6m41eC36kQEmxwPnVmACSN+j1Ni7o1qcfj9hfNGyiEUrktOwr7Yik7Jk4ig+ENTe5kVLy3lVY6RCGZPziILloAG8CcFDS4cTRgSt0= 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=AuupdtqTMfBH29IIInxpJ3guepa8i6IMBBOjKNv+ROWllsEYVdlo1F3daXvsrchm3kRomGpF9v8/zMEZHancyee0FU6DSvje0bNejokbalSqp5CQFe+OUnwPoeFBow4/rVGvRYQUlxwsHIgstR9zXDUzGhvs7WaiEPGfgTrIWzM= Received: by 10.78.147.6 with SMTP id u6mr807078hud.1185560820178; Fri, 27 Jul 2007 11:27:00 -0700 (PDT) Received: by 10.78.18.9 with HTTP; Fri, 27 Jul 2007 11:27:00 -0700 (PDT) Message-ID: Date: Fri, 27 Jul 2007 14:27:00 -0400 From: "Merlin Moncure" To: "Michael Dengler" Subject: Re: How to use a trigger to write rows to a remote server Cc: "Tom Lane" , 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: <18352.1184770316@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/388 X-Sequence-Number: 26072 On 7/18/07, Michael Dengler wrote: > Hmm..I was hoping to avoid personal insults.... > > Anyway, Nuts or not...what I am attempting is to simply have row from one > table inserted into another servers DB I don't see it as replication > because: I think you took Tom's comments the wrong way. He is suggesting you are nuts to attempt trigger based data transfer to remote server when there are two clearly better options, slony and dblink. You took as a personal insult which was just some frank (and frankly good) advice... Slony is in fact the _solution_ to the problem of transferring data between servers with triggers. If your tables are well designed and you are reasonably proficient with stored procedures, and you requirements of transfer are very specific and not extremely time sensitive, a poll based system over dblink is also a good solution. > a) The destination table will have a trigger that modifies the arriving data > to fit its table scheme. > b) It is not critical that the data be synchronous (ie a lost row on the > destination DB is not a big deal) > c) I see as more of a provision of data to the destination DB NOT A > REPLICATION OF DATA. based on this you may want to rig dblink/poll. 3rd option is pitr shipping to warm standby, depending on your requirements. > Essentially the remote server just wants to know when some record arrives at > the source server and wants to know some of the info contained in the new > record. > > And yes it may be that I know little about the myriad of problems involved > with replication...but I do know how to carry on a civil, adult > conversation....maybe we can have a knowledge exchange. now that's a bit dramatic :-) merlin