aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/commit_ts.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-11-01 21:22:07 +0900
committerMichael Paquier <michael@paquier.xyz>2020-11-01 21:22:07 +0900
commitb17ff07aa3eb142d2cde2ea00e4a4e8f63686f96 (patch)
tree4a0e8b7b6f6584f0776963da80f072b4b7249363 /src/backend/access/transam/commit_ts.c
parentaecaa04418f39c32adb3dbf91c4aa7f6e175f01c (diff)
downloadpostgresql-b17ff07aa3eb142d2cde2ea00e4a4e8f63686f96.tar.gz
postgresql-b17ff07aa3eb142d2cde2ea00e4a4e8f63686f96.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/access/transam/commit_ts.c')
0 files changed, 0 insertions, 0 deletions