From: | Milan Krcmar <milan(dot)krcmar(at)seznam(dot)cz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | External (asynchronous) notifications of database updates |
Date: | 2005-06-20 02:33:43 |
Message-ID: | 20050620023343.GA24567@mrsk.din.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi List,
I have a(n external) system driven by data in a Postgres database. I am
looking for a functionality, which would asynchronously inform the
system of any updates into the database, so the system could reflect the
updates (without having to poll the database at regular basis).
I have been skimming through various Postres' replication tools,
becasuce replication needs the same functionality in general. All the
tools I've found are based on, yes, triggers. But I don't know how to
cope with transactions - strictly speaking with rollbacks:
As a row-level 'after insert/update/delete' trigger can create
an external notification of the change, it will not see the reverse
change if the current transaction is later rolled back.
I don't know how the various replication tools solve this - do you?
Thanks in advance for any piece of information, now I choose a terrible
hack - when I get a notification, I wait for 10 seconds and then read
the whole table... It works for me now, but might not work tomorrow.
Milan
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-06-20 04:07:35 | Re: plpgsql constraint checked data fails to restore |
Previous Message | Andres | 2005-06-20 02:08:50 | Re: Insert behavior in transaction |