<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=RU style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hello!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>I use Postgresql+Pacemaker+Corosync cluster with 2 Postgresql instances in synchronous replication mode. <span lang=EN-US>Parameter “</span>rep_mode<span lang=EN-US>” is </span>set to "sync", <span lang=EN-US>and when I shut down replica normal way, primary node swithes to the async mode. But when I </span> shut down the replica by powering it off to emulate power unit failure, primary remains in sync mode <span lang=EN-US>and c</span>lients hang on INSERT operations until "pcs resource cleanup" is performed<span lang=EN-US>. I created an alert agent to run </span>"pcs resource cleanup"<span lang=EN-US> when any node is lost, but this approach doesn’t work.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>What should I do to be sure the primary node will switch to async mode if replica becomes lost for any cause</span>? <span lang=EN-US><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Best regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Sergey Cherukhin<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>