Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4RMS-0003Ck-08 for pgsql-general@arkaria.postgresql.org; Thu, 14 Mar 2019 14:29:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4RMQ-0006ho-HJ for pgsql-general@arkaria.postgresql.org; Thu, 14 Mar 2019 14:29:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4RMQ-0006fl-5l for pgsql-general@lists.postgresql.org; Thu, 14 Mar 2019 14:29:30 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4RMN-0001VR-Iz for pgsql-general@postgresql.org; Thu, 14 Mar 2019 14:29:29 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id DB1C021AB8; Thu, 14 Mar 2019 10:29:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 14 Mar 2019 10:29:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=d uu4RAF6A355aiOa2zcghE6zKemnkSsgYcC53sT3YPY=; b=W5WNMMAQ7VO7LQVSh 7A+u3k9mf0+jC9iFVMpkWNeTYUxz6FxhKdOemDvnx/qxN1x6ElFLvZ6h/s3kPgad KvjlfYZAJGq0rbY2xum333+poUFHMJOl96ZdbT1RcL6KSjrQs0fA52vf38cgUBqv VZFJtZscqvNeuWjxWd9kpMpQkJZjnZtFoocgiMb4fzUCO3PNrDwdLrlXJzXk14Jd edDR8YIfEVcrBLcS4MQNQFFBzZRCxCinrJCvtTe16FJ+9WzZLAA24qpcL817JRj6 ARbfqO3MKCbQe4gQb9RLiJPc5RO4oK+TpDE58kDnGX0fVhNabwGi26SDGOcX1np0 meCvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=duu4RAF6A355aiOa2zcghE6zKemnkSsgYcC53sT3Y PY=; b=7HSxIevmLXYGrez7YuPUhe3xcEkfJbB42cDUPdpH64T4PaVHHlUUwO59g Bdqewy0Zr04Ufp8vPxnmc8lGdEEzcVGi+BrZHrkrcxzDKW/+qI+znHFwyvwud49C buKo/PTKwPOic36oOXz5Fwt+sVhFmr+HEV8XOupP1DFdqNiZRowmbtOorRU8bvMG U+ZP4BQah5XE5Z0jb/2e3TWP/iCK6QOHM3all9BNwUIb/uPcrzBc+4AvMsPLkWH2 QiijMOJ+7jpcXDiisMilo3FdECqDaYz0gaSr67MGBMv3b3kceM18XMM/8DImnlQU nN/xitBBQZBP0WYSkak8h6nQRNNwQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrhedvgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepohhsghgvohdrohhrgh enucfkphepjedurddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhm pegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrh fuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id EA8E910315; Thu, 14 Mar 2019 10:29:24 -0400 (EDT) Subject: Re: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation To: fuzk Cc: pgsql-general@postgresql.org References: <58a76837.43af.16974f968f0.Coremail.fuzk80_76@163.com> <2fb2c6ad.74b1.1697ac42b3f.Coremail.fuzk80_76@163.com> From: Adrian Klaver Message-ID: Date: Thu, 14 Mar 2019 07:29:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <2fb2c6ad.74b1.1697ac42b3f.Coremail.fuzk80_76@163.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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" 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