Wed Jan 2 11:00:29 PST 2008
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /home/cvsd/slony1/slony1-engine
In directory main.slony.info:/tmp/cvs-serv29551
Modified Files:
RELEASE-2.0
Log Message:
Apply changes to cleanup thread:
- by default, use TRUNCATE rather than DELETE to trim sl_log_? tables
- moved substantially all logic for trimming of old data out of the
C code, and into cleanupThread() stored function
The stored function now can be used to request cleanup, so that we
might force it to happen at an unexpected time, such as manually,
for testing, as part of a test script.
- added parameters to slon to support this:
interval - cleanup_interval (default '10 minutes')
This controls how quickly old events are trimmed out. It used to
be a hard-coded value.
Old events are trimmed out once the confirmations are aged by
(cleanup_interval).
This then controls when the data in sl_log_1/sl_log_2 can be dropped.
Data in *those* tables is deleted when it is older than the
earliest XID still captured in sl_event.
boolean - cleanup_deletelogs (default 'false')
This controls whether or not we DELETE data from sl_log_1/sl_log_2
By default, we now NEVER delete data from the log tables; we
instead use TRUNCATE.
Index: RELEASE-2.0
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/RELEASE-2.0,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** RELEASE-2.0 11 Dec 2007 20:27:11 -0000 1.10
--- RELEASE-2.0 2 Jan 2008 19:00:27 -0000 1.11
***************
*** 112,113 ****
--- 112,159 ----
Note that this affects the structure of sl_event, and leads to some
changes in the coding of the regression tests.
+
+ - All of the interesting cleanup work is now done in the stored
+ function, cleanupEvent(interval, boolean).
+
+ Interesting side-effect: You can now induce a cleanup manually,
+ which will be useful for testing.
+
+ - cleanupEvent now has two parameters, passed in from slon config
+ parameters:
+
+ interval - cleanup_interval (default '10 minutes')
+
+ This controls how quickly old events are trimmed out. It used to
+ be a hard-coded value.
+
+ Old events are trimmed out once the confirmations are aged by
+ (cleanup_interval).
+
+ This then controls when the data in sl_log_1/sl_log_2 can be
+ dropped.
+
+ Data in *those* tables is deleted when it is older than the
+ earliest XID still captured in sl_event.
+
+ boolean - cleanup_deletelogs (default 'false')
+
+ This controls whether or not we DELETE data from sl_log_1/sl_log_2
+
+ By default, we now NEVER delete data from the log tables; we
+ instead use TRUNCATE.
+
+ - We now consider initiating a log switch every time cleanupEvent()
+ runs.
+
+ If the call to logswitch_finish() indicates that there was no log
+ switch in progress, we initiate one.
+
+ This means that log switches will be initiated almost as often as
+ possible. That's a policy well worth debating :-).
+
+ - logswitch_finish() changes a fair bit...
+
+ It uses the same logic as in cleanupEvent() to determine if there
+ are any *relevant* tuples left in sl_log_[whatever], rather than
+ (potentially) scanning the table to see if there are any undeleted
+ tuples left.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list