From: fuzk <fuzk80_76@163.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re:Re: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
Date: Fri, 15 Mar 2019 10:12:05 +0800 (CST)
Message-ID: <29d97280.3551.1697f1ee80e.Coremail.fuzk80_76@163.com> (raw)
In-Reply-To: <d70da878-74ca-4b8e-e3b5-812686c52738@aklaver.com>
References: <58a76837.43af.16974f968f0.Coremail.fuzk80_76@163.com>
<e6e81462-2330-238d-6a31-9746718173b9@aklaver.com>
<2fb2c6ad.74b1.1697ac42b3f.Coremail.fuzk80_76@163.com>
<d70da878-74ca-4b8e-e3b5-812686c52738@aklaver.com>
When I set max_parallel_workers_per_gather=0, the select statement can execute successfully. The problem has been solved. Thank you all very much. Alan
At 2019-03-14 22:29:24, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
>On 3/13/19 10:54 PM, fuzk wrote:
>> Dear Adrian,
>>
>> My setting is as following.
>>
>> max_parallel_workers_per_gather=32
>
>Not sure if it is possible without affecting other operations, but you
>could set the above to 0 to temporarily disable parallel queries and see
>if that eliminates the error.
>
>Also see:
>
>https://trac.osgeo.org/postgis/ticket/4129
>
>>
>> I am looking forward to hearing from you.
>>
>> Many thanks
>> Alan.
>>
>>
>>
>>
>>
>>
>>
>> At 2019-03-13 22:31:11, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
>>>On 3/12/19 7:54 PM, fuzk wrote:
>>>> Dear Sir/Madam
>>>>
>>>> I got an error when I execute the following select sentence.
>>>> Would you please solve the problem for me?
>>>
>>>What version of Postgres?
>>>
>>>> Thank you .
>>>>
>>>> Alan Fu.
>>>>
>>>> postgres=# \set VERBOSITY verbose
>>>> postgres=# SELECT
>>>> round(cast(coalesce(sum(ST_length(geography(geometry)))/1000,0) as
>>>> NUMERIC),4)||'KM' field_value from had_link;
>>>>
>>>> ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
>>>> CONTEXT: SQL statement "SELECT proj4text FROM public.spatial_ref_sys
>>>> WHERE srid = 4326 LIMIT 1"
>>>> parallel worker
>>>> LOCATION: GetLatestSnapshot, snapmgr.c:387
>>>
>>>I'm guessing ST_length is not parallel safe.
>>>
>>>What is your setting for?:
>>>
>>>max_parallel_workers_per_gather
>>>
>>>>
>>>>
>>>
>>>
>>>--
>>>Adrian Klaver
>>>adrian.klaver@aklaver.com
>>
>>
>>
>
>
>--
>Adrian Klaver
>adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: fuzk80_76@163.com, adrian.klaver@aklaver.com
Subject: Re: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
In-Reply-To: <29d97280.3551.1697f1ee80e.Coremail.fuzk80_76@163.com>
References: <58a76837.43af.16974f968f0.Coremail.fuzk80_76@163.com> <e6e81462-2330-238d-6a31-9746718173b9@aklaver.com> <2fb2c6ad.74b1.1697ac42b3f.Coremail.fuzk80_76@163.com> <d70da878-74ca-4b8e-e3b5-812686c52738@aklaver.com> <29d97280.3551.1697f1ee80e.Coremail.fuzk80_76@163.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox