# pre-commit stage

**URL:** <https://forums.percona.com/t/pre-commit-stage/5515>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [March 29, 2017, 6:04am UTC](https://forums.percona.com/t/pre-commit-stage/5515 "2017-03-29T06:04:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![filaret](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@filaret](https://forums.percona.com/u/filaret)\
**Post date:** [March 29, 2017, 6:04am UTC](https://forums.percona.com/t/pre-commit-stage/5515/1 "2017-03-29T06:04:13Z")

</div>

There is a problem concerning large ALTER or for example adding the index - the whole database comes to pre-commit stage and until the request is executed it will remain in this stage. This means that all other databases which are on the same server can not process requests and are waiting for that request to be executed. Is there any parameter that would allow us not to block the database to which the request does not apply?  
I.E. In Db1 ALTER is processed while DB2 can normally handle requests and is not waiting in queue.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [March 30, 2017, 2:03am UTC](https://forums.percona.com/t/pre-commit-stage/5515/2 "2017-03-30T02:03:56Z")

</div>

You can try 3 methods:

Method 1  
execute on each node until all nodes are altered:  
set wsrep\_osu\_method=‘RSU’;  
  
set wsrep\_osu\_method=‘TOI’;

Method 2  
shutdown one node  
start the node without wsrep plugin  
run the alter  
restart the node and let it join the cluster  
do the same on other nodes

Method 3  
Use pt-online-schema-change [url][https://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html[/url]](https://www.percona.com/doc/percona-toolkit/2.2/pt-online-schema-change.html%5B/url%5D)

For 1 and 2, direct all apps to the nodes that aren’t running the alter.

---

<div class="post-metadata">

**Author:** ![mirfan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mirfan/32/16890_2.png) [@mirfan](https://forums.percona.com/u/mirfan)\
**Post date:** [March 30, 2017, 2:07am UTC](https://forums.percona.com/t/pre-commit-stage/5515/3 "2017-03-30T02:07:11Z")

</div>

On Percona XtraDB Cluster (PXC) using RSU method or just pt-online-schema-change is better option. This is handy blogpost [URL][https://www.percona.com/blog/2015/10/09/online-ddl-percona-xtradb-cluster-5-6/[/URL]](https://www.percona.com/blog/2015/10/09/online-ddl-percona-xtradb-cluster-5-6/%5B/URL%5D)

---

<div class="post-metadata">

**Author:** ![filaret](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@filaret](https://forums.percona.com/u/filaret)\
**Post date:** [March 30, 2017, 5:39am UTC](https://forums.percona.com/t/pre-commit-stage/5515/4 "2017-03-30T05:39:32Z")

</div>

Thank you!
