SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    There is no general chat z0s0's Avatar
    Join Date
    Aug 1998
    Location
    Melbourne
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL 4.x Replication "relay-log"

    After upgrading to 4.x I noticed the introduction of relay logs. I never saw them in 3.x so I presume it's a new "feature"?

    Essentially the slave server now saves every command from the masters' update log as it receives them. It writes them to the local filesystem, apparently after - not before - executing them.

    Why? I have no idea. I can't see any real use for this.

    But whats far more annoying is that I cannot find _any_ way to rotate / rollover / DELETE! this stuff short of stopping and starting MySQL.

    Which I'm sure none of you like me doing when you're in the middle of a post ;-) But if fills up around 300mb every couple of days so something needs to be done.

    Anyone have any suggestions?
    Wormly Server Performance Monitoring
    Don't wait for an SMS at 4am. Find out what's really
    going on and fix the problem. www.wormly.com/website-monitoring

  2. #2
    There is no general chat z0s0's Avatar
    Join Date
    Aug 1998
    Location
    Melbourne
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no one has any idea?
    ;-)
    Wormly Server Performance Monitoring
    Don't wait for an SMS at 4am. Find out what's really
    going on and fix the problem. www.wormly.com/website-monitoring

  3. #3
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    According to this page they are actually written *before* execution and *should* clear out. There are more elegant solutions to this problem but that is what there is to work with.

    In any rate, a quick search of MySQL.com shows that, in the Rep Options there are two keys that look promising:
    relay-log-purge
    and
    relay-log-space-limit

    Read the descriptions carefully and come up with a good log-limit and the first option should ensure it doesn't get too much larger than that.

  4. #4
    There is no general chat z0s0's Avatar
    Join Date
    Aug 1998
    Location
    Melbourne
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that Matt.

    I was wondering why I hadn't noticed this before, then realised "Available since MySQL 4.1.1" isn't much good to me since the 4.1 release is in Alpha.

    I wonder if the space-limit one will work on its own...
    Wormly Server Performance Monitoring
    Don't wait for an SMS at 4am. Find out what's really
    going on and fix the problem. www.wormly.com/website-monitoring

  5. #5
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by z0s0
    Thanks for that Matt.
    I wonder if the space-limit one will work on its own...
    It sounds like it isn't! I would suspect that, since this is new and there are not a lot of 4.1.1 rep users that this could be a bug. Try searching their bugtraq (do they have one?) and if not, submit a bug!

  6. #6
    There is no general chat z0s0's Avatar
    Join Date
    Aug 1998
    Location
    Melbourne
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah no joy with the space-limit one. It kindly just stopped replicating alogether once it reached that limit. Should have known ;-)

    Not using 4.1 yet, still 4.0. I've been keeping an eye on the bug tracker... maybe I should bite the bullet and submit one.
    Wormly Server Performance Monitoring
    Don't wait for an SMS at 4am. Find out what's really
    going on and fix the problem. www.wormly.com/website-monitoring


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •