Re: Add parallelism and glibc dependent only options to reindexdb
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Thomas Munro <thomas.munro@gmail.com>, Daniel Verite <daniel@manitou-mail.org>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Kevin Grittner <kgrittn@gmail.com>
Date: 2019-07-22T04:11:14Z
Lists: pgsql-hackers
On Fri, Jul 19, 2019 at 08:29:27AM +0200, Julien Rouhaud wrote:
> On Fri, Jul 19, 2019 at 2:35 AM Michael Paquier <michael@paquier.xyz> wrote:
>> For the second patch, could you send a rebase with a fix for the
>> connection slot when processing the reindex commands?
>
> Attached, I also hopefully removed all the now unneeded progname usage.
+ Note that this mode is not compatible the <option>-i / --index</option>
+ or the <option>-s / --system</option> options.
Nits: this is not a style consistent with the documentation. When
referring to both the long and short options the formulation "-i or
--index" gets used. Here we could just use the long option. This
sentence is missing a "with".
simple_string_list_append(&tables, optarg);
+ tbl_count++;
break;
The number of items in a simple list is not counted, and vacuumdb does
the same thing to count objects. What do you think about extending
simple lists to track the number of items stored?
+$node->issues_sql_like([qw(reindexdb -j2)],
+ qr/statement: REINDEX TABLE public.test1/,
+ 'Global and parallel reindex will issue per-table REINDEX');
Would it make sense to have some tests for schemas here?
One of my comments in [1] has not been answered. What about
the decomposition of a list of schemas into a list of tables when
using the parallel mode?
[1]: https://www.postgresql.org/message-id/20190711040433.GG4500@paquier.xyz
--
Michael
Commits
-
Add support for --jobs in reindexdb
- 5ab892c391c6 13.0 landed
-
Remove more progname references in vacuumdb.c
- 3cae75f4209b 13.0 landed
-
Refactor parallelization processing code in src/bin/scripts/
- 5f3840370b63 13.0 landed