Re: ERROR: subtransaction logged without previous top-level txn record
От | Amit Kapila |
---|---|
Тема | Re: ERROR: subtransaction logged without previous top-level txn record |
Дата | |
Msg-id | CAA4eK1LuOGujY2v0u5bAp1VEKfWebHXBSEP0L-DO88p0MXFioQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: ERROR: subtransaction logged without previous top-level txn record (Arseny Sher <a.sher@postgrespro.ru>) |
Ответы |
Re: ERROR: subtransaction logged without previous top-level txn record
|
Список | pgsql-bugs |
On Sun, Feb 9, 2020 at 9:37 PM Arseny Sher <a.sher@postgrespro.ru> wrote: > > > Somehow I hadn't realized this earlier, so my comments/commit messages > in patches above were not accurate here; I've edited them. Also in the > first patch serialized snapshots are not no longer used for new slot > creation at all, as Andres suggested above. > + /* + * Don't use serialized snapshot if we are not sure where all + * currently running xacts will finish (new slot creation). + * (Actually, if we came here through xl_running_xacts, we could perform + * SNAPBUILD_FULL_SNAPSHOT -> SNAPBUILD_CONSISTENT transition properly, + * but added lines of code would hardly worth the benefit.) + */ + if (builder->start_decoding_at == InvalidXLogRecPtr) + return false; Instead of using start_decoding_at to decide whether to restore snapshot or not, won't it be better to have new variable in SnapBuild (say can_use_serialized_snap or something like that) and for this purpose? I think the patch is trying to use a variable that is not meant for the purpose we are using for it, so not sure if it is the right direction for the fix. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
В списке pgsql-bugs по дате отправления: