Christopher Browne cbbrowne
Thu Jul 14 20:53:53 PDT 2005
I'm attaching two patches for "Log Rotation", one which was what I
started with, and one that is merged with Darcy's patch to improve speed
of SUBSCRIBE SET.

The point of the exercise is for this to use both sl_log_1 and
sl_log_2.  At each cleanup loop, the slon considers either switching
between log tables or truncating the "elder" one.  The value of this is
that if each table is getting truncated more or less regularly, that's
both cheaper than deleting them, and will make sure that they won't get
bloated with any sort of empty space.

The "joint" one is probably going to be easier to work with, as it has
some fixes, and has #defines to compile in, by default.  I have fiddled
the frequency of cleanup loops to be every 30 seconds rather than 10
minutes so that it actually gets around to

I'm running into a strange problem with this...

When I run test_1_pgbench, it runs to completion, and three of the four
tables compare perfectly.

The one table that doesn't compare perfectly is the accounts table.

What is doubly odd is that I don't see accounts being updated *at all*
after it is initialized.  No entries ever seem to enter
sl_log_1/sl_log_2 for this table.

The same is true if I run a test without the log rotation patch; that
feels like about triple odd.

My sense in this is that perhaps this is breaking at COPY_SET time, that
accounts is being updated then, and that there are updates lost.  But
it's very odd that it would be just on the one table.

At any rate, I thought I should get some eyes on this as...
a) It ought to go in some time
b) Maybe the problem will be obvious to someone else
c) I'm away all of next week so it wouldn't likely move for a while
anyways...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: joint.diff.bz2
Type: application/x-bzip
Size: 8198 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050714/30faa9b0/joint.diff-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logrotate.diff.bz2
Type: application/x-bzip
Size: 6660 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050714/30faa9b0/logrotate.diff-0001.bin


More information about the Slony1-general mailing list