[GENERAL] Reduce the time to know trigger_fi​le's existence

2012-09-03 Thread Harshitha S
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.


[GENERAL] Re: [GENERAL] Reduce the time to know trigger_fi​le's existence

2012-09-03 Thread Harshitha S
Hi,

Can Latch - that postgres already uses, be used to achieve the same?

On Tue, Sep 4, 2012 at 6:31 AM, Craig Ringer ring...@ringerc.id.au wrote:

 On 09/03/2012 04:30 PM, Harshitha S 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.


 File system notification APIs aren't portable. If you want to implement
 this you'll need to support at least the Windows FSNotify stuff,
 notification features compatible with several different Linux versions and
 with the BSDs, with a fallback to polling for other platforms.

 For Windows:

 http://msdn.microsoft.com/en-**us/library/windows/desktop/**
 aa365261(v=vs.85).aspxhttp://msdn.microsoft.com/en-us/library/windows/desktop/aa365261%28v=vs.85%29.aspx

 For Linux it appears that inotify has been present since 2005:

   http://en.wikipedia.org/wiki/**Inotifyhttp://en.wikipedia.org/wiki/Inotify

 but it's probably best to add a configure test and fall back to polling if
 it isn't found.




 This will mean adding a new internal API and then adding backend/port/
 implementations for various platforms, as well as taking the current code
 and splitting it out into a port file that gets used if no other is chosen.

 This page is likely to be useful:

 
 http://wiki.postgresql.org/**wiki/So,_you_want_to_be_a_**developer%3Fhttp://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F

 --
 Craig Ringer



Re: [GENERAL] could not create file base/16384/11500: File exists

2011-10-10 Thread Harshitha S
Hi,

The postgres server version is 9.0.4 on the Linux platform.
The vaccum - related settings have default values.

If it is OID wrap around, how to resolve it?

Regards,
Harshitha



2011/10/10 Filip Rembiałkowski plk.zu...@gmail.com

 Hello,

 You gave much too little information. Please see
 http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

 Especially:
 - server version, platform
 - vacuum-related settings

 It *might* be OID wraparaound.




 2011/10/10 Harshitha S hershe...@gmail.com

 Hi,

 We are the following msg in the postgres logs.
 could not create file base/16384/11500: File exists

 Some links indicate that the issue is related to OIDs.
 Please help me in understanding why the message is appearing and how the
 issue can be resolved.

 Regards,
 Harshitha





Re: [GENERAL] could not create file base/16384/11500: File exists

2011-10-10 Thread Harshitha S
Also, this is the case of first startup of the postgres server.
This msg is shown in the startup logs.
2011/10/10 Harshitha S hershe...@gmail.com

 Hi,

 The postgres server version is 9.0.4 on the Linux platform.
 The vaccum - related settings have default values.

 If it is OID wrap around, how to resolve it?

 Regards,
 Harshitha



 2011/10/10 Filip Rembiałkowski plk.zu...@gmail.com

 Hello,

 You gave much too little information. Please see
 http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

 Especially:
 - server version, platform
 - vacuum-related settings

 It *might* be OID wraparaound.




 2011/10/10 Harshitha S hershe...@gmail.com

 Hi,

 We are the following msg in the postgres logs.
 could not create file base/16384/11500: File exists

 Some links indicate that the issue is related to OIDs.
 Please help me in understanding why the message is appearing and how the
 issue can be resolved.

 Regards,
 Harshitha






[GENERAL] could not create file base/16384/11500: File exists

2011-10-09 Thread Harshitha S
Hi,

We are the following msg in the postgres logs.
could not create file base/16384/11500: File exists

Some links indicate that the issue is related to OIDs.
Please help me in understanding why the message is appearing and how the
issue can be resolved.

Regards,
Harshitha


[GENERAL] Tracing in Postgres

2011-07-22 Thread Harshitha S
Hi,

I am trying to integrate a tracing framework in the Postgres code.
I need to know if elog.c under backend/utils/error is the place where the
changes can be made.

The tracing framework that I want to integrate has some additional
capability. I want to replace the tracing and logging functionality in the
existing Postgres framework with the APIs used in this framework without
making changes in every file.
If anybody has any inputs on this, please help me.

Thanks,
Harshitha