From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Kevin Grittner <kgrittn(at)gmail(dot)com> |
Subject: | Re: Add parallelism and glibc dependent only options to reindexdb |
Date: | 2019-07-22 12:40:19 |
Message-ID: | CAOBaU_YfksDTTbvwRKoMg_r6gh7i_T+gRYgAfdNym6BJODjsSQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 22, 2019 at 6:11 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> 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(at)paquier(dot)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".
Right, so I kept the long option. Also this comment was outdated, as
the --jobs is now just ignored with a list of indexes, so I fixed that
too.
>
> 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?
I considered this, but it would require to adapt all code that declare
SimpleStringList stack variable (vacuumdb.c, clusterdb.c,
createuser.c, pg_dumpall.c and pg_dump.c), so it looked like too much
trouble to avoid 2 local variables here and 1 in vacuumdb.c. I don't
have a strong opinion here, so I can go for it if you prefer.
>
> +$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?
I did that in attached v6, and added suitable regression tests.
Attachment | Content-Type | Size |
---|---|---|
reindex_parallel_v6.diff | application/octet-stream | 18.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Korotkov | 2019-07-22 12:58:38 | Re: Psql patch to show access methods info |
Previous Message | David Rowley | 2019-07-22 12:16:44 | Re: Cleaning up and speeding up string functions |