<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
<body>
<style>
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
</style>
<div style = 'font-family:Helvetica,Helvetica,微软雅黑, 宋体; line-height:1.6;'>
<div ></div><div>
<div>
<div style="font-family: Helvetica, Helvetica, 微软雅黑, 宋体;">I am guessing you used pg_pathman or other extensions in addition to postgis?</div><div><font face="Helvetica, Helvetica, 微软雅黑, 宋体">Postgis use SPI_exec() to execute sql statement "</font><span style="font-family: Arial; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">SELECT proj4text FROM public.spatial_ref_sys WHERE srid = 4326 LIMIT 1</span><font face="Helvetica, Helvetica, 微软雅黑, 宋体">” in each worker progress in postgres parallel query, pg_pathman will rewrite the query plan by pg_pathman planner hook and </font><font color="#000000" face="Arial" style="font-family: Helvetica, Helvetica, 微软雅黑, 宋体;">GetLatestSnapshot. But in parallel query, the snapshot of each worker progress is the same as leader progress, the worker progress is not </font><font face="Helvetica, Helvetica, 微软雅黑, 宋体">necessary</font><font color="#000000"><font face="Helvetica, Helvetica, 微软雅黑, 宋体"><font face="Arial"> to get the latest snapshot, that</font>’<font face="Arial">s the problem. I think it</font></font><font face="Arial">’</font><font face="Helvetica, Helvetica, 微软雅黑, 宋体" style="font-family: Arial;">s a bug of pg_pathman, t</font></font><font face="Helvetica, Helvetica, 微软雅黑, 宋体">here’s a pg_pathman issue for detail: </font><a href="https://github.com/postgrespro/pg_pathman/issues/215" style="font-family: Helvetica, Helvetica, 微软雅黑, 宋体;">https://github.com/postgrespro/pg_pathman/issues/215</a></div></div><div><br></div><div>Eric Wong.</div>
</div><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:''Helvetica','Microsoft Yahei', '微软雅黑'';">
<div style="font-size:12px;line-height:1.6;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">08/5/2020 11:02</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:fuzk80_76(at)163(dot)com">fuzk<fuzk80_76(at)163(dot)com></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 14px; font-family: ''Helvetica','Microsoft Yahei', '微软雅黑'';">
<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Dear Sir/Madam</div><div><br></div><div>I got an error when I execute the following select sentence.</div><div>Would you please solve the problem for me?</div><div>Thank you .</div><div><br></div><div>Alan Fu.</div><div><br></div><div>postgres=# \set VERBOSITY verbose</div><div>postgres=# SELECT round(cast(coalesce(sum(ST_length(geography(geometry)))/1000,0) as NUMERIC),4)||'KM' field_value from had_link;</div><div><br></div><div>ERROR: XX000: cannot update SecondarySnapshot during a parallel operation<br>CONTEXT: SQL statement "SELECT proj4text FROM public.spatial_ref_sys WHERE srid = 4326 LIMIT 1"<br>parallel worker<br>LOCATION: GetLatestSnapshot, snapmgr.c:387</div></div><br><br><span title="neteasefooter"><p> </p></span></blockquote><!--�-->
</div>
</body>
</html>