Re: Hi- How frequently Postgres Poll for trigger file - Mailing list pgsql-hackers

From aaliya zarrin
Subject Re: Hi- How frequently Postgres Poll for trigger file
Date
Msg-id AANLkTi=P4P4XLBB0dps7QkdTuC+VUkJ0=yev5Qy7ny7X@mail.gmail.com
Whole thread
In response to Re: Hi- How frequently Postgres Poll for trigger file  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Hi- How frequently Postgres Poll for trigger file
List pgsql-hackers
Thanks for quick response..
Can I change this 5 second time?
I have seen the postgres code as well.
What is the functionality of WaitLatch() function. I could not understand completely.
Plz help..

On Wed, Dec 1, 2010 at 5:53 PM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote:
On 01.12.2010 13:27, aaliya zarrin wrote:
I want to know how frequently postgres search for trigger file to switch
over.

In 9.0, every 100ms while streaming replication is active and connected. 5 seconds otherwise. In current git master branch, it's always 5 s.


Can this switch over time be reduced?

Not without hacking the sources and compiling.

Although, on many platforms, Linux included I believe, sending a signal to the startup process should wake it up from the sleep and make it check the trigger file immediately. "pg_ctl reload" for example should do it. So if ıou send a signal to the startup process immediately after creating the trigger file, it should take notice sooner.


Plz let me know where postgres poll for trigger file. I could find it out in
"backend/access/trans/xlog.c" ? am i right?

Yes. search for callers of CheckForStandbyTrigger() function.


--
 Heikki Linnakangas
 EnterpriseDB   http://www.enterprisedb.com



--
Thanks & Regards,

Aaliya Zarrin
(+91)-9160665888

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: crash-safe visibility map, take three
Next
From: Robert Haas
Date:
Subject: Re: crash-safe visibility map, take three