pgsql: Fix off-by-one error in calculating subtrans/multixact truncatio

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix off-by-one error in calculating subtrans/multixact truncatio
Дата
Msg-id E1ZI2YC-0001xP-Fl@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix off-by-one error in calculating subtrans/multixact truncation point.

If there were no subtransactions (or multixacts) active, we would calculate
the oldestxid == next xid. That's correct, but if next XID happens to be
on the next pg_subtrans (pg_multixact) page, the page does not exist yet,
and SimpleLruTruncate will produce an "apparent wraparound" warning. The
warning is harmless in this case, but looks very alarming to users.

Backpatch to all supported versions. Patch and analysis by Thomas Munro.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/40ad7822019a2cf8b9e0d5bd770490af7b56e652

Modified Files
--------------
src/backend/access/transam/multixact.c |   14 ++++++++++----
src/backend/access/transam/subtrans.c  |    7 ++++++-
src/include/access/multixact.h         |    1 +
3 files changed, 17 insertions(+), 5 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix off-by-one error in calculating subtrans/multixact truncatio
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix off-by-one error in calculating subtrans/multixact truncatio