Re: pgbench - extend initialization phase control - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - extend initialization phase control
Date
Msg-id alpine.DEB.2.21.1911071209260.20647@lancre
Whole thread Raw
In response to Re: pgbench - extend initialization phase control  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Hello,

>> I think that the actual oversight is that the checkInitSteps should be
>> called at the beginning of processing initialization steps rather than
>> while processing -I, because currently other places modify the
>> initialization string (no-vacuum, foreign key) and thus are not checked.
>
> As far as I read the code, runInitSteps() does the check. If the initialization
> steps string contains unrecognized character, runInitSteps() emits an error.

Sure, but the previous step have been executed and committed, the point of 
the check is to detect the issue before starting the execution.

>    * (We could just leave it to runInitSteps() to fail if there are wrong
>    * characters, but since initialization can take awhile, it seems friendlier
>    * to check during option parsing.)
>
> The above comment in checkInitSteps() seems to explain why 
> checkInitSteps() is called at the beginning of processing initialization 
> steps.

Yep, the comment is right in the motivation, but not accurate anymore wrt 
the submitted patch. V2 attached updates this comment.

-- 
Fabien.



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Add Change Badges to documentation
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions