Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi0aC-0001eJ-Bs for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2016 14:45:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bi0aB-0003at-Kt for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2016 14:45:39 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bi0aA-0003am-SG for pgsql-hackers@postgresql.org; Thu, 08 Sep 2016 14:45:39 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi0a7-0007eD-Vv for pgsql-hackers@postgresql.org; Thu, 08 Sep 2016 14:45:37 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 0F5D521C297F; Thu, 8 Sep 2016 17:45:34 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from mail.postgrespro.ru ([127.0.0.1]) by localhost (mail.postgrespro.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N_JbnKX8RT8f; Thu, 8 Sep 2016 17:45:33 +0300 (MSK) Received: from localhost (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id B79C521C297A; Thu, 8 Sep 2016 17:45:33 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1473345933; bh=EvK69aHKCK3veqAkPsCMK4kfvwicpXVyOeelgjePWNc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=or64xfQ0+EEODWOdnziFYV0ghlRhQNIwLjZRgsTPkSuu/YjFJUn6XPTpXzMxnDUtY Q4m+gbUGsrF0egI++TsHlJ5/iH1bXyVObYhxbcUxN5KUl7X739ctgpR2cE8HVswnaa 7gok0k1HG7zXUY40uCnM2KH57IFBPzhXYOCmZyR0= Date: Thu, 8 Sep 2016 17:44:05 +0300 From: Aleksander Alekseev To: Victor Wagner Cc: pgsql-hackers@postgresql.org Subject: Re: Patch: Implement failover on libpq connect level. Message-ID: <20160908144405.GB1182@e733> References: <20160831111330.53a018ed@fafnir.local.vm> <20160905072215.4efd7b8a@wagner.wagner.home> <20160905110311.GA11351@e733> <20160908142420.0609f202@fafnir.local.vm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160908142420.0609f202@fafnir.local.vm> User-Agent: Mutt/1.6.1 (2016-04-27) X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hello, Victor. > I'm sending new version of patch. > > I've replaced readonly option with target_server_type (with JDBC > compatibility alias targetServerType), > > use logic of setting defaults based on number of hosts in the connect > string instead of complicated condition in the state machine, > > added checks for return values of memory allocation function. > > Also, I've solved pg_usleep problem by linking pgsleep.c into libpq > along with some other libpgport objects which are already linked there. > > Thus client applications don't need to link with libpgport and libpq > shared library is self-containted. This patch doesn't apply to master branch: ``` $ git apply ~/temp/libpq-failover-8.patch /home/eax/temp/libpq-failover-8.patch:184: trailing whitespace. check: /home/eax/temp/libpq-failover-8.patch:252: trailing whitespace. /* /home/eax/temp/libpq-failover-8.patch:253: trailing whitespace. * Validate target_server_mode option /home/eax/temp/libpq-failover-8.patch:254: trailing whitespace. */ /home/eax/temp/libpq-failover-8.patch:306: trailing whitespace. appendPQExpBuffer(&conn->errorMessage, error: src/interfaces/libpq/t/001-multihost.pl: already exists in working directory $ git diff ``` -- Best regards, Aleksander Alekseev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers