X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C2D194758E6 for ; Fri, 14 Feb 2003 00:53:28 -0500 (EST) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 271FE475425 for ; Fri, 14 Feb 2003 00:53:28 -0500 (EST) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 4.0.4) with ESMTP-TLS id 1611443; Thu, 13 Feb 2003 22:28:36 -0800 Message-ID: <3E4C83ED.3030802@joeconway.com> Date: Thu, 13 Feb 2003 21:51:41 -0800 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Frankie Lam Cc: pgsql-sql@postgresql.org, Darko Prenosil Subject: Re: dblink question please References: <3E4B9003.6060907@joeconway.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/319 X-Sequence-Number: 11717 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