Re:ERROR: XX000: cannot update SecondarySnapshot during a parallel operation

From: fight(dot)mufasa <fight(dot)mufasa(at)gmail(dot)com>
To: fuzk <fuzk80_76(at)163(dot)com>
Cc: pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>
Subject: Re:ERROR: XX000: cannot update SecondarySnapshot during a parallel operation
Date: 2020-08-05 03:25:13
Message-ID: 88D6639A-1913-4B26-8939-4DC6D4072078@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<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 &nbsp;pg_pathman or other extensions in addition to postgis?</div><div><font face="Helvetica, Helvetica, 微软雅黑, 宋体">Postgis use SPI_exec() &nbsp;to execute sql statement &nbsp;"</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, &nbsp;pg_pathman will rewrite the query plan by pg_pathman planner hook and&nbsp;</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&nbsp;</font><font face="Helvetica, Helvetica, 微软雅黑, 宋体">necessary</font><font color="#000000"><font face="Helvetica, Helvetica, 微软雅黑, 宋体"><font face="Arial">&nbsp;to get the latest snapshot, that</font>’<font face="Arial">s the problem. &nbsp;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:&nbsp;</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&lt;fuzk80_76(at)163(dot)com&gt;</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:&nbsp; XX000: cannot update SecondarySnapshot during a parallel operation<br>CONTEXT:&nbsp; SQL statement "SELECT proj4text FROM public.spatial_ref_sys WHERE srid = 4326 LIMIT 1"<br>parallel worker<br>LOCATION:&nbsp; GetLatestSnapshot, snapmgr.c:387</div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span></blockquote><!--�-->
</div>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 3.6 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-08-05 05:42:13 Re: 12.3 replicas falling over during WAL redo
Previous Message Raj Gandhi 2020-08-04 21:50:27 Re: Postgres 12 - default value for text column