git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: cd142e0) | patch
Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY
2021年2月10日 04:06:48 +0000 (13:06 +0900)
2021年2月10日 04:06:48 +0000 (13:06 +0900)
commit bd12080980297dbc8ae926a3bd5b2ef9cc47932b
Preserve pg_attribute.attstattarget across REINDEX CONCURRENTLY

For an index, attstattarget can be updated using ALTER INDEX SET
STATISTICS. This data was lost on the new index after REINDEX
CONCURRENTLY.

The update of this field is done when the old and new indexes are
swapped to make the fix back-patchable. Another approach we could look
after in the long-term is to change index_create() to pass the wanted
values of attstattarget when creating the new relation, but, as this
would cause an ABI breakage this can be done only on HEAD.

Reported-by: Ronan Dunklau
Author: Michael Paquier
Reviewed-by: Ronan Dunklau, Tomas Vondra
Discussion: https://postgr.es/m/16628084.uLZWGnKmhe@laptop-ronand
Backpatch-through: 12
src/backend/catalog/index.c diff | blob | blame | history
src/backend/utils/cache/lsyscache.c diff | blob | blame | history
src/include/utils/lsyscache.h diff | blob | blame | history
src/test/regress/expected/create_index.out diff | blob | blame | history
src/test/regress/sql/create_index.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /