Re: How to use a trigger to write rows to a remote server - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: How to use a trigger to write rows to a remote server
Date
Msg-id 469E199D.1040402@enterprisedb.com
Whole thread Raw
In response to How to use a trigger to write rows to a remote server  ("Michael Dengler" <michael.dengler@gmail.com>)
List 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

pgsql-performance by date:

Previous
From: "Michael Dengler"
Date:
Subject: How to use a trigger to write rows to a remote server
Next
From: Csaba Nagy
Date:
Subject: Re: How to use a trigger to write rows to a remote server