mirror of
https://github.com/postgres/postgres.git
synced 2026-06-10 09:10:33 -04:00
Initialize index stats during parallel VACUUM.
Initialize shared memory allocated for index stats to avoid a hard
crash. This was possible when parallel VACUUM became confused about the
current phase of index processing.
Oversight in commit 8e1fae1938, which refactored parallel VACUUM.
Author: Masahiko Sawada <sawada.mshk@gmail.com>
Reported-By: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20220818133406.GL26426@telsasoft.com
Backpatch: 15-, the first version with the refactoring commit.
This commit is contained in:
parent
72af71aad9
commit
08c23f4204
1 changed files with 1 additions and 0 deletions
|
|
@ -317,6 +317,7 @@ parallel_vacuum_init(Relation rel, Relation *indrels, int nindexes,
|
|||
|
||||
/* Prepare index vacuum stats */
|
||||
indstats = (PVIndStats *) shm_toc_allocate(pcxt->toc, est_indstats_len);
|
||||
MemSet(indstats, 0, est_indstats_len);
|
||||
for (int i = 0; i < nindexes; i++)
|
||||
{
|
||||
Relation indrel = indrels[i];
|
||||
|
|
|
|||
Loading…
Reference in a new issue