Reduce the time to know trigger_fi​le's existence - Mailing list pgsql-general

From Harshitha S
Subject Reduce the time to know trigger_fi​le's existence
Date
Msg-id CAAe0G5tpvvHTO4WU5AUxH3qLrB5rTrqpsm1V78nJzDcBu6n0ZA@mail.gmail.com
Whole thread Raw
Responses Re: Reduce the time to know trigger_fi​le's existence  (Craig Ringer <ringerc@ringerc.id.au>)
Re: Reduce the time to know trigger_fi​le's existence  (Craig Ringer <ringerc@ringerc.id.au>)
Re: [GENERAL] Reduce the time to know trigger_fi​le's existence  (Magnus Hagander <magnus@hagander.net>)
List pgsql-general
Hi, 
 
We are trying to introduce a thread that monitors the creation of the trigger_file. As and when the file is created, the process that monitors postgres server needs to be notified through the inotify API.

This is to reduce the 3-4 seconds delay that exists with the current implementation in postgres. As per the current implementation, the thread checks for the existence of the file every 5 seconds. If the file got created just 1 second after the sleep, there is a wait time of 4 seconds before we know whether the file is present or not. We intend to avoid this delay by using inotify().

PostgreSQL version number you are running: postgres 9.1.5

How you installed PostgreSQL: Downloaded and compiled the sources

 
Does anyone have suggestions on the appropriate place to add inotify_add_watch to achieve our objective?
Thanks in advance.

pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)
Next
From: togetinfo mail
Date:
Subject: Reduce the time to know trigger_file's existence