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 1h44Lf-00085R-30 for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Mar 2019 13:55:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h44Ld-0004va-Rt for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Mar 2019 13:55:09 +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 1h44Ld-0004oE-GU for pgsql-bugs@lists.postgresql.org; Wed, 13 Mar 2019 13:55:09 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h44LW-0001Ib-EL for pgsql-bugs@lists.postgresql.org; Wed, 13 Mar 2019 13:55:08 +0000 Received: by mail-qt1-x842.google.com with SMTP id d2so1909711qti.11 for ; Wed, 13 Mar 2019 06:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=iFwl2Z/xXZQMMwQy+ON3KnR3l1yuq9OtgfQkgB7YqT4=; b=VbjUGEsJ7pD5Cv7fWcCdBmRrVOhpBgsKeJYrBp5gDusJzQVbWpaPrXbKecIR6V8cqx OtCFG1viQ76xfU1Zgar8OLOqjdfnfvvjJZ4bDQJaOcnguvznwbqAdWTleLArDA7OVIUX d/GMeb2DyDPtO902sVo7BxepmPbuj5h7kyR4H4ei5NsxqyHoybCA3p/QYlWEF0KxRN25 LnJGWwOL33+QXnR9KjSf+U4ZoP9//V8UN3C8rNKcjfqaLDGs7QMVbg7ShKyEvtf58FD1 FjYfjOLAq4mYCAwk/be0nJQfLlq8sGJMArOt9O63IKq40PhNXApTRKH/AKVXbldcNxYz +UsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=iFwl2Z/xXZQMMwQy+ON3KnR3l1yuq9OtgfQkgB7YqT4=; b=IIA2S9CaGOUDPmlP+gQgKTQcIS3vh0Pkw9uGJmCPTPVIQ2to2N0uxH8eudlEPTNgXh auv3xjHgqrNExzqoGUMeMwq1owaO/3ShD0iXDFL7QeQ9UjBvtlXr+LFLBPjGicGWznQO B6MaaT8K5MasE0TCV0kgYMkOwpF1bycAN88ssKxIq3uToOhmpBj+WfpiA/yrwNZvgklA hdkbG6hHEYH0LKmEmOxAaLOr7K9MvTY9qAX30oOb+M+1WD6vrOh/Y/d0s10VRz872dcb H7q5ksdgcCgg7DIxmZkgf8sF+Yj93QOIuNRCmrPcgmkp2CJXcvGL5fU7C9Y4omagD0qY nEGw== X-Gm-Message-State: APjAAAVde1ulermaAu5TXEpTTHA++nOcssMkCNpY3RY9aJQ3UFw7y5lA QYwqIbmRN4WKHRRph0dBSRuYxg== X-Google-Smtp-Source: APXvYqzxNQHJlbO+BuplobQOcz7RiUqnYruFMfMKF260mvwgMRK1jW9A2fEjB1os8g2ICgxOSOlu7g== X-Received: by 2002:a0c:94d3:: with SMTP id k19mr34476473qvk.114.1552485301387; Wed, 13 Mar 2019 06:55:01 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id t1sm2001769qtp.88.2019.03.13.06.55.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 06:55:00 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A9FA1121C5C; Wed, 13 Mar 2019 10:54:55 -0300 (-03) Date: Wed, 13 Mar 2019 10:54:55 -0300 From: Alvaro Herrera To: fuzk80_76@163.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation Message-ID: <20190313135455.GA13993@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15691-62c4e860b7120958@postgresql.org> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Mar-13, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 15691 > Logged by: zhongkuan fu > Email address: fuzk80_76@163.com > PostgreSQL version: 10.3 > Operating system: Centos linux 7.4.1708 > Description: > > I cannot execute the following select sentence and got an error. > > 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 Sounds like a function is marked parallel-safe that shouldn't. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services