<div dir="ltr"><div>Working on a pgpool setup for a client last Friday and were at a point where we had to restart the master database to change some postgresql.conf settings. We&#39;d done this before without incident, but not with their application actually using pgpool and writing to the DB. This time it was, but wasn&#39;t doing anything of importance that a failed write would matter for the duration of a master restart.<br><br>However, when the master came back up, suddenly the pgool nodes (which were running on the application servers) were sending writes to the slave. These were just plain INSERT &amp; UPDATE statements, not inside of a function or CTE. Restarting pgpool on some of the app nodes seemed to fix it, but two of the nodes that were much busier would not seem to reset even after a restart. I tried just a normal &quot;-m fast&quot; restart of the slave, but that didn&#39;t fix it. I actually had to shut the slave down for 10-15 seconds and suddenly the pgpool nodes realized those connections were no longer valid and reconnected to the master.<br><br></div>We tried to reproduced this again with another master restart, but it didn&#39;t happen. So, seems to be some sort of edge case with a busy pgpool node and restarting the master system. Wasn&#39;t able to retry again on this system since they had to get it working. I&#39;ll see if I can get some test systems up and running to try and reproduce it, but I figured I&#39;d send an email in to at least see if someone else has run into this or can look at the parts of the code that handle this stuff. If you need anymore info, let me know.<br><br>Thanks, <br clear="all"><div><div><div><div class="gmail_signature">--<br>Keith Fiske<br>Database Administrator<br>OmniTI Computer Consulting, Inc.<br><a href="http://www.keithf4.com" target="_blank">http://www.keithf4.com</a></div></div>
</div></div></div>