pgsql: Refactor option handling of CLUSTER, REINDEX and VACUUM

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Refactor option handling of CLUSTER, REINDEX and VACUUM
Дата
Msg-id E1l1Mji-0005lg-Re@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Refactor option handling of CLUSTER, REINDEX and VACUUM

This continues the work done in b5913f6.  All the options of those
commands are changed to use hex values rather than enums to reduce the
risk of compatibility bugs when introducing new options.  Each option
set is moved into a new structure that can be extended with more
non-boolean options (this was already the case of VACUUM).  The code of
REINDEX is restructured so as manual REINDEX commands go through a
single routine from utility.c, like VACUUM, to ease the allocation
handling of option parameters when a command needs to go through
multiple transactions.

This can be used as a base infrastructure for future patches related to
those commands, including reindex filtering and tablespace support.

Per discussion with people mentioned below, as well as Alvaro Herrera
and Peter Eisentraut.

Author: Michael Paquier, Justin Pryzby
Reviewed-by: Alexey Kondratov, Justin Pryzby
Discussion: https://postgr.es/m/X8riynBLwxAD9uKk@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a3dc926009be833ea505eebd77ce4b72fe708b18

Modified Files
--------------
src/backend/catalog/index.c      |  22 +++---
src/backend/commands/cluster.c   |  19 +++--
src/backend/commands/indexcmds.c | 162 ++++++++++++++++++++++++++-------------
src/backend/commands/tablecmds.c |   4 +-
src/backend/commands/vacuum.c    |  10 +--
src/backend/tcop/utility.c       |  40 +---------
src/include/catalog/index.h      |  19 +++--
src/include/commands/cluster.h   |  13 ++--
src/include/commands/defrem.h    |   6 +-
src/include/commands/vacuum.h    |  27 ++++---
src/tools/pgindent/typedefs.list |   2 +
11 files changed, 175 insertions(+), 149 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: pageinspect: Fix relcache leak in gist_page_items().
Следующее
От: Fujii Masao
Дата:
Сообщение: pgsql: postgres_fdw: Add function to list cached connections to foreign