From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Michael Dengler <michael.dengler@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to use a trigger to write rows to a remote server
Date: Wed, 18 Jul 2007 14:46:05 +0100
Message-ID: <469E199D.1040402@enterprisedb.com> (raw)
In-Reply-To: <e8733d090707180636q45bb5d16vff3e79c2d60d2e83@mail.gmail.com>
References: <e8733d090707180636q45bb5d16vff3e79c2d60d2e83@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: heikki@enterprisedb.com, michael.dengler@gmail.com
Subject: Re: How to use a trigger to write rows to a remote server
In-Reply-To: <469E199D.1040402@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox