diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-11-01 21:24:15 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-11-01 21:24:15 +0900 |
commit | 41a033b5054e047cc67a92e17fbbe4accb658b3b (patch) | |
tree | cf96d9caedb06be32ba75eb48a44cee70dc9fc8e /src/backend/executor/nodeModifyTable.c | |
parent | 741b84e9f74726fbc97f63ddb46ab5675de98bdf (diff) | |
download | postgresql-41a033b5054e047cc67a92e17fbbe4accb658b3b.tar.gz postgresql-41a033b5054e047cc67a92e17fbbe4accb658b3b.zip |
Preserve index data in pg_statistic across REINDEX CONCURRENTLY
Statistics associated to an index got lost after running REINDEX
CONCURRENTLY, while the non-concurrent case preserves these correctly.
The concurrent and non-concurrent operations need to be consistent for
the end-user, and missing statistics would force to wait for a new
analyze to happen, which could take some time depending on the activity
of the existing autovacuum workers. This issue is fixed by copying any
existing entries in pg_statistic associated to the old index to the new
one. Note that this copy is already done with the data of the index in
the stats collector.
Reported-by: FabrÃzio de Royes Mello
Author: Michael Paquier, FabrÃzio de Royes Mello
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/CAFcNs+qpFPmiHd1oTXvcPdvAHicJDA9qBUSujgAhUMJyUMb+SA@mail.gmail.com
Backpatch-through: 12
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions