Re: How to use a trigger to write rows to a remote server

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Michael Dengler <michael(dot)dengler(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: How to use a trigger to write rows to a remote server
Date: 2007-07-18 13:46:05
Message-ID: 469E199D.1040402@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Michael Dengler wrote:
> I am trying to find out how to use a trigger function on a table to copy
> any
> inserted row to a remote PG server.

Have a look at contrib/dblink.

You'll have to think what you want to happen in error scenarios. For
example, if the connection is down, or it brakes just after inserting
the row to the other db, but before committing. Or if the insert on the
other server succeeds, but the local transaction aborts.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Csaba Nagy 2007-07-18 14:02:12 Re: How to use a trigger to write rows to a remote server
Previous Message Michael Dengler 2007-07-18 13:36:33 How to use a trigger to write rows to a remote server