pgsql: Fix bug in SetOffsetVacuumLimit() triggered by find_multixact_st

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Fix bug in SetOffsetVacuumLimit() triggered by find_multixact_st
Дата
Msg-id E1a8Qmr-0004DB-S7@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix bug in SetOffsetVacuumLimit() triggered by find_multixact_start() failure.

Previously, if find_multixact_start() failed, SetOffsetVacuumLimit() would
install 0 into MultiXactState->offsetStopLimit if it previously succeeded.
Luckily, there are no known cases where find_multixact_start() will return
an error in 9.5 and above. But if it were to happen, for example due to
filesystem permission issues, it'd be somewhat bad: GetNewMultiXactId()
could continue allocating mxids even if close to a wraparound, or it could
erroneously stop allocating mxids, even if no wraparound is looming.  The
wrong value would be corrected the next time SetOffsetVacuumLimit() is
called, or by a restart.

Reported-By: Noah Misch, although this is not his preferred fix
Discussion: 20151210140450.GA22278@alap3.anarazel.de
Backpatch: 9.5, where the bug was introduced as part of 4f627f

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cca705a5d93446e1a9c775b94c7d5900986c0488

Modified Files
--------------
src/backend/access/transam/multixact.c |    8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix bug in SetOffsetVacuumLimit() triggered by find_multixact_st
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix out-of-memory error handling in ParameterDescription message