Skip site navigation (1) Skip section navigation (2)

Re: Hi- How frequently Postgres Poll for trigger file

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: aaliya zarrin <aaliya(dot)zarrin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Hi- How frequently Postgres Poll for trigger file
Date: 2010-12-01 12:23:32
Message-ID: 4CF63E44.1050704@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
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

In response to

Responses

pgsql-hackers by date

Next:From: LewDate: 2010-12-01 12:27:59
Subject: Re: [HACKERS] Improved JDBC driver part 2
Previous:From: Kristian NielsenDate: 2010-12-01 11:53:02
Subject: Re: We need index-only scans

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group