extern transaction logging - Mailing list pgsql-general

From Horst Herb
Subject extern transaction logging
Date
Msg-id 008e01bf9d74$8ef8cb20$0100a8c0@hugin
Whole thread Raw
List pgsql-general
Hi all,

I am a Postgres novice,so please excuse if my question looks rather dumb.
I need to log all commited transactions externally on a backup server as
soon as they are commited. What would be the best way to do it efficiently?

Originally, in the first design of my 3-tier-system, I planned to send all
SQL statements from my clients to a transaction server, parse and process
them, and then pass them on to the Postgres server. The erformance costs are
obvious. Several other options came to my mind after browsing through the
Postgres documentation:

- triggers / stored procedures
- rules
- ?

That way, my application would communicate directly with the Postgres
server, and the Postgres server would just start a thread sending all the
data off to my transaction logging server after each insert/update/delete
event - therefore no delay for the end user.

Now, I can write the "transaction server" in C, but I have the feeling it
would be much less work (and more efficient in performance terms) using
triggers or rules or a different mechanism already built in in Postgres. Any
suggestions for a PostgreSQL greenhorn?

Horst


pgsql-general by date:

Previous
From: rafal.nospam@paputek.decsoft.com.pl (Rafal Slubowski)
Date:
Subject: Re: How do I change the default editor in psql
Next
From: "Cédric Prévost"
Date:
Subject: word search