From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Harshitha S <hershetha(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: [GENERAL] Reduce the time to know trigger_file's existence |
Date: | 2012-09-04 07:29:32 |
Message-ID: | CABUevEyDpWU4TCZifY3zfXU+1teWb=oDMpTsEjxYOSZZ1QzZ3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Mon, Sep 3, 2012 at 8:30 AM, Harshitha S <hershetha(at)gmail(dot)com> wrote:
> 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.
"pg_ctl promote" already uses a signal to remove this time delay. Is
there a reason you can't just use this?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Johannes Segitz | 2012-09-04 07:49:43 | SEPostgreSQL alive? |
Previous Message | Yvon Thoraval | 2012-09-04 06:31:34 | recovering databases |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Farina | 2012-09-04 09:07:30 | txid failed epoch increment, again, aka 6291 |
Previous Message | Magnus Hagander | 2012-09-04 07:21:02 | Re: Some whitespaces in utility.c |