Re: Trigger to clone across databases?

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Darren Govoni" <darren(at)ontrenet(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Trigger to clone across databases?
Date: 2009-01-17 08:08:52
Message-ID: dcc563d10901170008y1399aebam57bbd5b8e82726b0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 16, 2009 at 6:31 PM, Darren Govoni <darren(at)ontrenet(dot)com> wrote:
> Hi,
> I'm looking for a trigger (any language) that can clone the inserted
> row and insert it in another postgres server elsewhere. Is this
> possible? Practical? Thoughts?
>
> I know there are some replication systems out there, but I'm hoping a
> simple trigger will suffice since I only need to clone one row at a time
> on insert.

Slony does essentially that. A trigger puts the updates into a log
table, the slony process gathers all the changes up and puts them into
the destination tables.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2009-01-17 08:54:38 MemoryContextSwitchTo (Re: [GENERAL] Autovacuum daemon terminated by signal 11)
Previous Message Scott Marlowe 2009-01-17 07:40:48 Re: accessing user table structures from SQL