<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <dl style="line-height: 1.5; margin-left: 2em">
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Author</dt>
      <dd style="margin-left: 8.5em">Kouhei Sutou &lt;kou****@clear*****&gt;</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Date</dt>
      <dd style="margin-left: 8.5em">2016-08-12 23:58:47 +0900 (Fri, 12 Aug 2016)</dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">New Revision</dt>
      <dd style="margin-left: 8.5em"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a">485c2a145f8b981b24b5285716342d397dd9b76a</a></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Message</dt>
      <dd style="margin-left: 8.5em"><pre style="border: 1px solid #aaa; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; padding: 0.5em; width: auto">Disable PGroonga in background worker

GitHub: fix <a href="https://github.com/pgroonga/pgroonga/issues/17">#17</a>

Reported by svsool. Thanks!!!</pre></dd>
      <dt style="clear: both; float: left; font-weight: bold; width: 8em">Modified files</dt>
      <dd style="margin-left: 8.5em">
        <ul>
          <li><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78ad">src/pgroonga.c</a></li>
        </ul>
      </dd>
    </dl>

    <div class="diff-section" style="clear: both">
      <table style="border-collapse: collapse; border: 1px solid #aaa">
        <thead>
          <tr class="diff-header" style="border: 1px solid #aaa">
            <td colspan="3">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">  Modified: src/pgroonga.c (+4 -0)</span>
<span class="diff-header-mark" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">===================================================================</span>
</pre>
            </td>
          </tr>
        </thead>
        <tbody>
          <tr>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL33">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL36">36</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL37">37</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL38">38</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL39">39</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL354">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL355">355</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL356">356</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL357">357</a></span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-nothing" style="display: block; white-space: pre">&nbsp;</span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL358">358</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL359">359</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adL360">360</a></span>
</pre>
            </th>
            <th class="diff-line-number" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR33">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR34">34</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR35">35</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR36">36</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR37">37</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR38">38</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR39">39</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR40">40</a></span>
<span class="diff-line-number-hunk-header" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR355">...</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR356">356</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR357">357</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR358">358</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR359">359</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR360">360</a></span>
<span class="diff-line-number-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR361">361</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR362">362</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR363">363</a></span>
<span class="diff-line-number-not-changed" style="display: block; white-space: pre"><a href="https://github.com/pgroonga/pgroonga/commit/485c2a145f8b981b24b5285716342d397dd9b76a#diff-e9c716e8d0dfa0be009c2bed075c78adR364">364</a></span>
</pre>
            </th>
            <td class="diff-content" style="border: 1px solid #aaa">
<pre style="border: 0; font-family: Consolas, Menlo, &quot;Liberation Mono&quot;, Courier, monospace; line-height: 1.2; margin: 0; padding: 0.5em; white-space: normal; width: auto"><span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -34,6 +34,7 @@</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;miscadmin.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;optimizer/clauses.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;optimizer/cost.h&gt;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+#include &lt;postmaster/bgworker.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;storage/bufmgr.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;storage/ipc.h&gt;</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> #include &lt;storage/lmgr.h&gt;</span>
<span class="diff-hunk-header" style="background-color: #eaf2f5; color: #999999; display: block; white-space: pre">@@ -355,6 +356,9 @@ <span class="diff-context" style="background-color: #ffffaa; color: #000000">PGrnInitializePrefixRKSequentialSearchData(void)</span></span>
<span class="diff-not-changed" style="display: block; white-space: pre"> void</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> _PG_init(void)</span>
<span class="diff-not-changed" style="display: block; white-space: pre"> {</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+        if (MyBgworkerEntry)</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+                return;</span>
<span class="diff-added" style="background-color: #eaffea; color: #000000; display: block; white-space: pre">+</span>
<span class="diff-not-changed" style="display: block; white-space: pre">         if (PGrnInitialized)</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                 ereport(ERROR,</span>
<span class="diff-not-changed" style="display: block; white-space: pre">                                 (errcode(ERRCODE_SYSTEM_ERROR),</span>
</pre>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>