Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
pt-archiver does not archive last row
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eric  
View profile  
 More options Jun 19 2012, 2:02 pm
From: Eric <eric.hard...@gmail.com>
Date: Tue, 19 Jun 2012 11:02:56 -0700 (PDT)
Local: Tues, Jun 19 2012 2:02 pm
Subject: pt-archiver does not archive last row

Hi ,
I am having a problem where pt-archiver is not archiving the last row from
my tables.  It just leaves the last row behind.
And then when there is only one row in the table no archive takes place at
all.
This happens on any table that i try to archive using where "1=1" technique
from manual.

Am i doing something wrong?

How to reproduce below.

Thanks,
-Eric

 pt-archiver --version
pt-archiver 2.0.3

CREATE TABLE `foo` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `modified_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1

INSERT INTO foo values
(null,null),(null,null),(null,null),(null,null),(null,null),(null,null),(nu ll,null),(null,null),(null,null),(null,null)
;

select count(*) from foo; # from source
+----------+
| count(*) |
+----------+
|       10 |
+----------+

/usr/bin/pt-archiver --source h=writer,D=test,t=foo,P=3306 --dest
h=archive,D=test,t=foo,P=3307 --sentinel /tmp/pt-archiver-sentinel
--replace --why-quit --where "1=1" --no-delete

 select count(*) from foo; # from destination
+----------+
| count(*) |
+----------+
|        9 |
+----------+


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Baron Schwartz  
View profile  
 More options Jun 19 2012, 2:17 pm
From: Baron Schwartz <ba...@percona.com>
Date: Tue, 19 Jun 2012 14:17:19 -0400
Local: Tues, Jun 19 2012 2:17 pm
Subject: Re: pt-archiver does not archive last row
It's a feature, not a bug. Please see the docs for --[no]safe-auto-increment.

- Baron

On Jun 19, 2012, at 2:02 PM, Eric wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eric  
View profile  
 More options Jun 19 2012, 4:38 pm
From: Eric <eric.hard...@gmail.com>
Date: Tue, 19 Jun 2012 13:38:55 -0700 (PDT)
Local: Tues, Jun 19 2012 4:38 pm
Subject: Re: pt-archiver does not archive last row

Adding --nosafe-auto-increment  fixed it.
I see where this option could be useful but, in my case the table is no
longer being written to and I want to archive and drop it afterwards.

Thanks for the help.

-Eric


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »