pgsql: Separate multixact freezing parameters from xid's

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Separate multixact freezing parameters from xid's
Дата
Msg-id E1WE4vt-0004Kb-46@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Separate multixact freezing parameters from xid's

Previously we were piggybacking on transaction ID parameters to freeze
multixacts; but since there isn't necessarily any relationship between
rates of Xid and multixact consumption, this turns out not to be a good
idea.

Therefore, we now have multixact-specific freezing parameters:

vacuum_multixact_freeze_min_age: when to remove multis as we come across
them in vacuum (default to 5 million, i.e. early in comparison to Xid's
default of 50 million)

vacuum_multixact_freeze_table_age: when to force whole-table scans
instead of scanning only the pages marked as not all visible in
visibility map (default to 150 million, same as for Xids).  Whichever of
both which reaches the 150 million mark earlier will cause a whole-table
scan.

autovacuum_multixact_freeze_max_age: when for cause emergency,
uninterruptible whole-table scans (default to 400 million, double as
that for Xids).  This means there shouldn't be more frequent emergency
vacuuming than previously, unless multixacts are being used very
rapidly.

Backpatch to 9.3 where multixacts were made to persist enough to require
freezing.  To avoid an ABI break in 9.3, VacuumStmt has a couple of
fields in an unnatural place, and StdRdOptions is split in two so that
the newly added fields can go at the end.

Patch by me, reviewed by Robert Haas, with additional input from Andres
Freund and Tom Lane.

Branch
------
REL9_3_STABLE

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

Modified Files
--------------
doc/src/sgml/config.sgml                      |   70 +++++++++++++++++++++++-
doc/src/sgml/maintenance.sgml                 |   56 ++++++++++++++++++-
doc/src/sgml/ref/create_table.sgml            |   39 +++++++++++++-
src/backend/access/common/reloptions.c        |   29 ++++++++++
src/backend/access/transam/multixact.c        |   21 ++++----
src/backend/access/transam/varsup.c           |    3 +-
src/backend/commands/cluster.c                |   29 +++++++---
src/backend/commands/vacuum.c                 |   67 +++++++++++++++++++----
src/backend/commands/vacuumlazy.c             |    6 ++-
src/backend/nodes/copyfuncs.c                 |    2 +
src/backend/nodes/equalfuncs.c                |    2 +
src/backend/parser/gram.y                     |   26 +++++++++
src/backend/postmaster/autovacuum.c           |   71 ++++++++++++++++++++-----
src/backend/utils/misc/guc.c                  |   30 +++++++++++
src/backend/utils/misc/postgresql.conf.sample |   11 ++--
src/include/commands/cluster.h                |    3 +-
src/include/commands/vacuum.h                 |    4 ++
src/include/nodes/parsenodes.h                |    5 ++
src/include/postmaster/autovacuum.h           |    1 +
src/include/utils/rel.h                       |   20 ++++++-
20 files changed, 446 insertions(+), 49 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Separate multixact freezing parameters from xid's
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Clean up error cases in psql's COPY TO STDOUT/FROM STDIN code.