pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Julien Rouhaud <rjuju123@gmail.com>
To: fuzk <fuzk80_76@163.com>
To: pramsey@cleverelephant.ca
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
Date: Thu, 14 Mar 2019 07:25:44 -0700
Message-ID: <b58f6cfd-69a4-44f5-bde9-0237b7d41d01@aklaver.com> (raw)
In-Reply-To: <CAOBaU_ZVGmy77o_9bV3te0PXZ58j2XssWJ3QukNKOSb=Y78N7g@mail.gmail.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>
	<CAOBaU_ZVGmy77o_9bV3te0PXZ58j2XssWJ3QukNKOSb=Y78N7g@mail.gmail.com>

On 3/14/19 6:14 AM, Julien Rouhaud wrote:
> On Thu, Mar 14, 2019 at 1:20 PM fuzk <fuzk80_76@163.com> wrote:
>>
>> Dear Adrian,
>>
>> My setting is as following.
>>
>> max_parallel_workers_per_gather=32
>>
>> I am looking forward to hearing from you.
> 
> What version of postgres and what version of postgis are you using ?
> 
>> At 2019-03-13 22:31:11, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
>>> On 3/12/19 7:54 PM, fuzk wrote:
>>>> 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 not familiar at all with geography, but if I read the code
> correctly, ST_Length / geography_length will call
> spheroid_init_from_srid(), which eventuallly calls GetProj4StringSPI()
> that run a query using SPI.  I'm not sure why exactly
> GetLatestSnapshot() is called here, or if SPI is really allowed in
> parallel workers, but that's the problem here apparently.  I'm adding
> Paul as he'll probably have a way better answer than me.
> 

https://trac.osgeo.org/postgis/ticket/4129
"Cannot update SecondarySnapshot during a parallel operation"

-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (14+ messages)  latest in thread

Message-ID: <b58f6cfd-69a4-44f5-bde9-0237b7d41d01@aklaver.com>
Permalink:  ../b58f6cfd-69a4-44f5-bde9-0237b7d41d01@aklaver.com/
Also on:    postgresql.org/message-id/b58f6cfd-69a4-44f5-bde9-0237b7d41d01@aklaver.com

 · 

reply

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: adrian.klaver@aklaver.com, rjuju123@gmail.com, fuzk80_76@163.com, pramsey@cleverelephant.ca
  Subject: Re: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
  In-Reply-To: <b58f6cfd-69a4-44f5-bde9-0237b7d41d01@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> <CAOBaU_ZVGmy77o_9bV3te0PXZ58j2XssWJ3QukNKOSb=Y78N7g@mail.gmail.com> <b58f6cfd-69a4-44f5-bde9-0237b7d41d01@aklaver.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