pt-online-schema-change any way to limit consumed ram ?


I was trying to use pt-online-schema-change to alter a big table, and it result on a segfault.
The table size is 12G, when I run pt-online-schema-change, it increase up to the max memory available on the server (4Gb), then it’s killed by the kernel.
I’ve already limited the memory used by mysql, but it’s the perl process of pt-online-schema-change that consume the memory.
Since the problem is not from mysql, the options --max-load and --critical-load have no effect. They mesure the mysql load, and this load is not huge, it’s only the ram consumed by the pt-online-schema-change that make problems (the ram consumed by the mysql process is low).

Is there any way to limit the ram used by the pt-online-schema-change ? Does it always try to store all the table in the ram ? The alter i’m trying (for testing purposes) to do is only to add a column.


Does the table have primary key or unique key? Please provide SHOW CREATE TABLE \G. Also the full pt-online-schema-change command.

Also good to learn the pt-online-schema-change version and your OS version.

I got the approximately same problem with pt-online-schema-change i tried also on a test table with 0 data into. And got the same probeme terminated by a segault.

After some searches and tests i finally discovered that the segfault seems generally due to a “bad formed” alter option.

I 'am running a 3 nodes percona 5.6.21-70.1-56 cluster on x86_64

Examples of --alter directive that bring to a segfault on 5.6 an works on 5.5:

ADD h INT NOT NULL (the same without NOT NULL is ok)
ADD g VARCHAR (the same with VARCHAR(50) is ok)

Is there a new more restrictive (documented ?) way to define alter statement with pt-online-schema-change with percona 5.6

Technical informations:
Ubuntu 14.04.1 x86_64
Percona 5.6.21-70.1.56 installed from
pt-online-schema-change version 2.2.13


Olivier FONTÈS


Can you share full pt-osc command you used? SHOW CREATE TABLE so we can try to reproduce this case?