> I think we've found a few existing problems with handling the parallel safety 
> of
> functions while doing an experiment.  Could I hear your opinions on what we
> should do?  I'd be willing to create and submit a patch to fix them.
> 
> The experiment is to add a parallel safety check in FunctionCallInvoke() and 
> run
> the regression test with force_parallel_mode=regress.  The added check
> errors out with ereport(ERROR) when the about-to-be-called function is
> parallel unsafe and the process is currently in parallel mode.  6 test cases 
> failed
> because the following parallel-unsafe functions were called:
> 
>     dsnowball_init
>     balkifnull
>     int44out
>     text_w_default_out
>     widget_out
> 
> The first function is created in src/backend/snowball/snowball_create.sql for
> full text search.  The remaining functions are created during the regression
> test run.
> 
> (1)
> All the above functions are actually parallel safe looking at their
> implementations.  It seems that their CREATE FUNCTION statements are just
> missing PARALLEL SAFE specifications, so I think I'll add them.
> dsnowball_lexize() may also be parallel safe.

I agree that it's better to mark the function with correct parallel safety 
lable.
Especially for the above functions which will be executed in parallel mode.
It will be friendly to developer and user who is working on something related 
to parallel test.

So, I attached the patch to mark the above functions parallel safe.

Best regards,
houzj

Attachment: 0001-fix-testcase-with-wrong-parallel-safety-flag.patch
Description: 0001-fix-testcase-with-wrong-parallel-safety-flag.patch

Reply via email to