BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation

Lists: pgsql-bugs
From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: fuzk80_76(at)163(dot)com
Subject: BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
Date: 2019-03-13 07:23:03
Message-ID: 15691-62c4e860b7120958@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15691
Logged by: zhongkuan fu
Email address: fuzk80_76(at)163(dot)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


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: fuzk80_76(at)163(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15691: ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
Date: 2019-03-13 13:54:55
Message-ID: 20190313135455.GA13993@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

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(at)163(dot)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