Nov 22, 2011

GTM standby problem

Testing GTM and GTM standby.   Somehow, GTM does not recognize GTM standby although startup and initial backup is successful.

Looked into the thread of GTM.   Althou I'm running only two GTM proxy with one worker thread, there's two thread in GTM for each GTM Proxy.   Each GTM Proxy is running only one thread, as specified.   Sigh...

Remembered that the main thread also have a connection to GTM.   So connection will be main thread + worker threads.

BTW, why the main thread need a connection to GTM?   It does nothing but accept client connection and assign it to one of the worker threads???

Problem fixed
There were essentially two failure, one was the condition to find GTM standby from the node registration.  The other was constructing connection information to GTM standby.   Format string was wrong.   With other fixes to handle non-null-terminated strings in libpq connection, it worked!!

No comments:

Post a Comment