Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi0eN-0001pD-2H for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2016 14:49:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bi0eM-00063P-LE for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Sep 2016 14:49:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bi0eL-00062f-Jq for pgsql-hackers@postgresql.org; Thu, 08 Sep 2016 14:49:57 +0000 Received: from newmail.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bi0eJ-00040b-0H for pgsql-hackers@postgresql.org; Thu, 08 Sep 2016 14:49:57 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id CDBA621C297F; Thu, 8 Sep 2016 17:49:53 +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 dHTDEPxCUegO; Thu, 8 Sep 2016 17:49:53 +0300 (MSK) Received: from localhost (unknown [192.168.27.1]) by mail.postgrespro.ru (Postfix) with ESMTPSA id 942C921C297A; Thu, 8 Sep 2016 17:49:53 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1473346193; bh=A7C0PfzhfhlcFCLEPHFu5iQ0I5Ep9SVVMgds6jzglis=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pwEESfGy2DA0RckOntENgQbx1wyMz79fEKkCfka7VopZeR+VWQ1eOV33PGLS8EQnt gxouEiSXMMrQc9Y302khlOstrADMpAXNkHHQtKxVfl4bw34HMufziJk/NMzQmCGBng nVT0pJLPGOo4FXIZ4JjMVJOu8IvnNI8axfe3pJxQ= Date: Thu, 8 Sep 2016 17:48:25 +0300 From: Aleksander Alekseev To: Victor Wagner Cc: pgsql-hackers@postgresql.org Subject: Re: Patch: Implement failover on libpq connect level. Message-ID: <20160908144825.GC1182@e733> References: <20160831111330.53a018ed@fafnir.local.vm> <20160905072215.4efd7b8a@wagner.wagner.home> <20160905110311.GA11351@e733> <20160908142420.0609f202@fafnir.local.vm> <20160908144405.GB1182@e733> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160908144405.GB1182@e733> 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 > ``` Oops. Sorry, my mistake. I forgot to check for untracked files. Everything is fine. -- 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