Re: pgsql: reindexdb: Add the index-level REINDEX with multiple jobs

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Alexander Korotkov <akorotkov@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Date: 2024-03-25T01:58:15Z
Lists: pgsql-hackers
On Mon, 25 Mar 2024 at 13:07, Alexander Korotkov
<akorotkov@postgresql.org> wrote:
> reindexdb: Add the index-level REINDEX with multiple jobs

This seems to cause a new compiler warning:

reindexdb.c: In function ‘reindex_one_database’:
reindexdb.c:437:45: warning: ‘indices_tables_cell’ may be used
uninitialized [-Wmaybe-uninitialized]
  437 |                         indices_tables_cell = indices_tables_cell->next;
      |                         ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
reindexdb.c:280:31: note: ‘indices_tables_cell’ was declared here
  280 |         SimpleStringListCell *indices_tables_cell;
      |                               ^~~~~~~~~~~~~~~~~~~

which is causing problems in -Werror buildfarm members like mamba [1]

David

 [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mamba&dt=2024-03-25%2001%3A03%3A35



Commits

  1. reindexdb: Fix the index-level REINDEX with multiple jobs

  2. reindexdb: Fix warning about uninitialized indices_tables_cell

  3. reindexdb: Add the index-level REINDEX with multiple jobs

  4. Rework logic and simplify syntax of REINDEX DATABASE/SYSTEM