Skip to content

Commit 662ba72

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 d9fbb88 commit 662ba72

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy