Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 08c23f4

Browse files
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 8e1fae1, 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.
1 parent 72af71a commit 08c23f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/commands/vacuumparallel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ parallel_vacuum_init(Relation rel, Relation *indrels, int nindexes,
317317

318318
/* Prepare index vacuum stats */
319319
indstats = (PVIndStats *) shm_toc_allocate(pcxt->toc, est_indstats_len);
320+
MemSet(indstats, 0, est_indstats_len);
320321
for (int i = 0; i < nindexes; i++)
321322
{
322323
Relation indrel = indrels[i];

0 commit comments

Comments
 (0)