From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 24 Jul 2019 15:55:18 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH] txn: don't unref stmt tuples before rollback triggers are run Message-ID: <20190724125518.GD11394@esperanza> References: <6520487.SKVt4zzWEJ@home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6520487.SKVt4zzWEJ@home.lan> To: =?utf-8?B?0JPQtdC+0YDQs9C40Lkg0JrQuNGA0LjRh9C10L3QutC+?= Cc: tarantool-patches@freelists.org, kostja@tarantool.org List-ID: On Wed, Jul 24, 2019 at 03:30:47PM +0300, Георгий Кириченко wrote: > Could we consider the possibility to assign triggers on a statement itself? > In this case you shouldn't implement all that machinery with savepoints. FYI I scrapped this patch, as I wrote in reply to this email: https://www.freelists.org/post/tarantool-patches/PATCH-txn-dont-unref-stmt-tuples-before-rollback-triggers-are-run,1 Instead I made savepoints support commit/rollback triggers: https://www.freelists.org/post/tarantool-patches/PATCH-04-Support-savepoints-in-DDL-transactions Regarding assigning commit/rollback triggers to individual statements. Although this would indeed work, I prefer not to do that, because it's somewhat expensive from the memory usage pov. Besides splitting commit/rollback trigger lists like that would complicate the code involving the triggers (running, setting/clearing triggers from Lua).