Andrew Sullivan ajs
Tue Oct 17 08:06:15 PDT 2006
On Tue, Oct 17, 2006 at 04:59:38PM +0200, Largo wrote:
> How is it possible to log all the changes I did to the DB in a file ; 

There are two ways I can think of:

1.	Have your application write redundantly.  This has the
disadvantage that you can't do this in scope of a transaction.

2.	Write a trigger function in C or some other untrusted
language, that writes the deltas out to a file inside the scope of
the transaction.  This has the danger that it will block your
application longer, and could cause some transactions to roll back.

But I also wonder what you're protecting against.  If you do either
of these (and especially, 2), it seems to me you have no more
protection than just logging everything in your database.  Which is
what Slony does anyway.  You could lose some transactions if the
database crashed unrecoverably; but presumably, if the disk is that
hosed, you'll also find your log file broken.  No?

A

-- 
Andrew Sullivan  | ajs at crankycanuck.ca
If they don't do anything, we don't need their acronym.
		--Josh Hamilton, on the US FEMA



More information about the Slony1-general mailing list