From: | "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com> |
---|---|
To: | "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | RE: [bug?] Missed parallel safety checks, and wrong parallel safety |
Date: | 2021-04-21 08:09:25 |
Message-ID: | OS0PR01MB571637085C0D3AFC3AB3600194479@OS0PR01MB5716.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> 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 | Content-Type | Size |
---|---|---|
0001-fix-testcase-with-wrong-parallel-safety-flag.patch | application/octet-stream | 6.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2021-04-21 08:15:14 | Re: PATCH: Add GSSAPI ccache_name option to libpq |
Previous Message | Pavel Stehule | 2021-04-21 07:54:10 | Re: Synchronous commit behavior during network outage |