From: | nando(at)freemail(dot)gr (Tsakiridis Orestis) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | otsakir(at)gmail(dot)com |
Subject: | No subject |
Date: | 2006-11-06 07:53:45 |
Message-ID: | 454eea09c04655.84244889@freemail.gr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I'm looking for a way to monitor all the queries that are executed by the server and to be able, by using these queries, to reproduce the data in all databases. The idea is to periodicaly (e.g. every two minutes) store the newly executed queries in a sort of wal segment file. I first tried to figure this out by monitoring the data in the wal file that is currently being updated (in the directory .../pg_xlogs). I hoped that it would be blank (filled with zeroes) from the last wal info inserted up to the end of the file. That was not the case. The wal files are recycled and the new wal info is written over the old one.
Another possible solution would be to configure the server to 'cycle' through the wal files every X seconds and not when the file is full (default 16MB) but i don't know if such a configuration parameter is available in the server functionality.
Finally, I also thought about placing a trigger in every table's update but this is far too complicated and cannot be applied to already functional database applications.
Any help appreciated
Tsakiridhs Oresths
P.S. It is very important that wal-like log files that are generated, in case
of execution, will reproduce the database exactly the way it was.
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Peter | 2006-11-06 08:25:49 | select result / functions from another database in plpgsql |
Previous Message | Desmond Coughlan | 2006-11-06 07:24:05 | . |