Bug in two-phase transaction recovery

Поиск
Список
Период
Сортировка
От Stas Kelvich
Тема Bug in two-phase transaction recovery
Дата
Msg-id 39DA46C9-9212-4CAF-AD4D-1C6FA91E1CA0@postgrespro.ru
обсуждение исходный текст
Ответы Re: Bug in two-phase transaction recovery  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
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
Дата:
Сообщение: Re: Install extensions using update scripts (was Re: Remove superuser() checks from pgstattuple)
Следующее
От: Victor Wagner
Дата:
Сообщение: Re: Patch: Implement failover on libpq connect level.