Reduce the time to know trigger_file's existence
От | togetinfo mail |
---|---|
Тема | Reduce the time to know trigger_file's existence |
Дата | |
Msg-id | CAJD1oad5nThPotFdgXc768xxg+VOuP2K2yzFrknWYGczextCQg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Reduce the time to know trigger_file's existence
|
Список | pgsql-hackers |
<p class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"><span style="FONT-FAMILY:'Courier New';FONT-SIZE:10pt"><fontface="trebuchet ms,sans-serif">Hi, </font></span><div class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm0cm 0pt"><span style="FONT-FAMILY:'Courier New'"><font face="trebuchet ms,sans-serif"></font></span> </div><divclass="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"><span style="FONT-FAMILY:'CourierNew'"><font face="trebuchet ms,sans-serif">We are trying to introduce a thread that monitors thecreation of the trigger_file. As and when the file is created, the process that monitors postgres server needs to be notifiedthrough the inotify API.</font></span></div><p class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"><spanstyle="FONT-FAMILY:'Courier New'"><font face="trebuchet ms,sans-serif">This is to reduce the 3-4 seconds delaythat exists with the current implementation in postgres. As per the current implementation, the thread checks for theexistence of the file every 5 seconds. If the file got created just 1 second after the sleep, there is a wait time of4 seconds before we know whether the file is present or not. We intend to avoid this delay by using inotify().</font></span><pclass="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"><span style="FONT-FAMILY:'CourierNew'"><font face="trebuchet ms,sans-serif">PostgreSQL version number you are running: postgres9.1.5</font></span><p class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm 0cm 0pt"><font face="trebuchet ms,sans-serif"><spanstyle="FONT-FAMILY:'Courier New'"><font face="trebuchet ms,sans-serif">How you installed PostgreSQL</font>:</span>Downloaded and compiled the sources</font><div class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm0cm 0pt"><font face="trebuchet ms,sans-serif"></font> </div><div class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm0cm 0pt"><font face="trebuchet ms,sans-serif">Does anyone have suggestions on the appropriateplace to add inotify_add_watch to achieve our objective?</font></div><div class="MsoNormal" style="LINE-HEIGHT:normal;MARGIN:0cm0cm 0pt"><font face="Trebuchet MS">Thanks in advance.</font></div>
В списке pgsql-hackers по дате отправления: