Bug in two-phase transaction recovery
От
Stas Kelvich
Тема
Bug in two-phase transaction recovery
Дата
Msg-id
39DA46C9-9212-4CAF-AD4D-1C6FA91E1CA0@postgrespro.ru
Список
Дерево обсуждения
Bug in two-phase transaction recovery Stas Kelvich <s.kelvich@postgrespro.ru>
Re: Bug in two-phase transaction recovery Michael Paquier <michael.paquier@gmail.com>
Re: Bug in two-phase transaction recovery Pavan Deolasee <pavan.deolasee@gmail.com>
Re: Bug in two-phase transaction recovery Simon Riggs <simon@2ndquadrant.com>
Re: Bug in two-phase transaction recovery Simon Riggs <simon@2ndquadrant.com>
Hello. Some time ago two-phase state file format was changed to have variable size GID, but several places that read that files were not updated to use new offsets. Problem exists in master and 9.6 and can be reproduced on prepared transactions with savepoints. For example: create table t(id int); begin; insert into t values (42); savepoint s1; insert into t values (43); prepare transaction 'x'; begin; insert into t values (142); savepoint s1; insert into t values (143); prepare transaction 'y’; and restart the server. Startup process will hang. Fix attached. Also while looking at StandbyRecoverPreparedTransactions() i’ve noticed that buffer for 2pc file is allocated in TopMemoryContext but never freed. That probably exists for a long time. -- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company
В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата: