Re: parallel vacuum comments
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>,
Peter Geoghegan <pg@bowt.ie>, Andres Freund <andres@anarazel.de>
Date: 2021-11-24T02:47:09Z
Lists: pgsql-hackers
On Wed, Nov 24, 2021 at 7:48 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
>
> On Fri, Nov 19, 2021 at 11:25 AM houzj.fnst@fujitsu.com
> <houzj.fnst@fujitsu.com> wrote:
> >
> > 3)
> >
> > + /*
> > + * Reset all index status back to invalid (while checking that we have
> > + * processed all indexes).
> > + */
> > + for (int i = 0; i < pvs->nindexes; i++)
> > + {
> > + PVIndStats *stats = &(pvs->indstats[i]);
> > +
> > + Assert(stats->status == INDVAC_STATUS_COMPLETED);
> > + stats->status = INDVAC_STATUS_INITIAL;
> > + }
> >
> > Would it be safer if we report an error if any index's status is not
> > INDVAC_STATUS_COMPLETED ?
>
> Agreed. It'd be safer since even if some indexes are vacuumed due to a
> bug vacuum errored out rather than continue it (and cause index
> corruption).
>
I think if we want to report an error in this case, we should use elog
as this is an internal error.
--
With Regards,
Amit Kapila.
Commits
-
Move parallel vacuum code to vacuumparallel.c.
- 8e1fae193864 15.0 landed
-
Move index vacuum routines to vacuum.c.
- cc8b25712b5e 15.0 landed
-
Improve parallel vacuum implementation.
- 22bd3cbe0c28 15.0 landed
-
Fix parallel amvacuumcleanup safety bug.
- c59278a1aa5e 15.0 landed
- f6162c020c88 14.1 landed
-
Simplify state managed by VACUUM.
- b4af70cb2103 14.0 cited