Frankie Lam wrote:
> Now the key problem is how I can just let it be when active master
> fails to connect to slave(of course it will mark the relative fields
> of status table, just don't wanna wait too long.)
>
The only thing I can think of is for you to write a C function
specifically for this purpose using the libpq asynchronous query
processing functions. See:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/libpq-async.html
A few months ago Darko Prenosil sent me his functions to add to dblink
(and he's been patiently waiting while I'm off busy with other stuff --
specifically PL/R -- sorry Darko!). They are basically wrappers around
various libpq functions. Unfortunately at quick glance it appears he
didn't implement the asynchronous ones.
Perhaps you could start with his hacked copy of dblink and add the
asynchronous functions yourself. I do still fully intend to update
dblink with Darko's functions before 7.4 is released, so if you do the
asynchronous functions, please send them in.
Darko -- is it OK for me to send your version of dblink to Frankie? Do
you have an updated copy or perhaps even the asynch functions?
Joe