Re: pg_upgrade: Pass -j down to vacuumdb - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_upgrade: Pass -j down to vacuumdb
Date
Msg-id 30470.1553551070@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_upgrade: Pass -j down to vacuumdb  (Jesper Pedersen <jesper.pedersen@redhat.com>)
Responses Re: pg_upgrade: Pass -j down to vacuumdb
Re: pg_upgrade: Pass -j down to vacuumdb
List pgsql-hackers
Jesper Pedersen <jesper.pedersen@redhat.com> writes:
> [ v9_0001-Highlight-that-the-jobs-option-isn-t-passed-down-to-.patch ]

Now that I've looked at this, it seems like it's fairly confused about
what the proposed VACUUMDB_OPTS variable would actually do for you.
If you're going to run vacuumdb directly, it hardly seems like you'd
bother with setting such a variable; you'd just enter the options you
want directly on the command line.

Conversely, if what you plan to do is set VACUUMDB_OPTS and then
run this script, the fact that --analyze-in-stages is hard-wired
into the script's invocation doesn't seem right either: you probably
don't want that if your goal is to get done as fast as possible.

In short, I'm not convinced that most of this patch is an improvement
on the status quo.  I think we'd be best off to just take the idea
of explicitly mentioning adding --jobs to a manual run, ie roughly

    fprintf(script, "echo %sthis script and run:%s\n",
            ECHO_QUOTE, ECHO_QUOTE);
    fprintf(script, "echo %s    \"%s/vacuumdb\" %s--all %s%s\n", ECHO_QUOTE,
            new_cluster.bindir, user_specification.data,
    /* Did we copy the free space files? */
            (GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?
            "--analyze-only" : "--analyze", ECHO_QUOTE);
+    fprintf(script, "echo %sYou may wish to add --jobs=N for parallel analyzing.%s\n",
+            ECHO_QUOTE, ECHO_QUOTE);
    fprintf(script, "echo%s\n\n", ECHO_BLANK);

    fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-in-stages\n",


            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Tid scan improvements
Next
From: Ryan Lambert
Date:
Subject: Re: Fix XML handling with DOCTYPE