Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS09r-00042R-Hj for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jul 2017 12:08:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dS09r-0007FW-4G for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jul 2017 12:08:51 +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 1dS08L-0004Y4-Mv for pgsql-hackers@postgresql.org; Mon, 03 Jul 2017 12:07:17 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dS08I-0004W5-Ah for pgsql-hackers@postgresql.org; Mon, 03 Jul 2017 12:07:16 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id DE28C21C03DD; Mon, 3 Jul 2017 15:07:11 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1499083631; bh=krK3EywljSpXrqSw+c3h/tmvWrsV1OXdIiaHE/R7rYA=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=hWyAOPlKqDql5WtyBJdDDpeJ4ciupaup/N9eUgDO2NrZ1XGi04xL6lMhG/wwf0v++ zjsnWQfcpU1lIMHfP9tBuj9D32Baw6CGRcM+V8VfoVmz73+85Zec4p83qLIirkCOMU SAk0lBICyU6V08gbgFgPf7ssX6XQslz4ovCfcvrY= Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 03 Jul 2017 15:07:11 +0300 From: Marina Polyakova To: Fabien COELHO Cc: PostgreSQL Developers Subject: Re: WIP Patch: Pgbench Serialization and deadlock errors Organization: Postgres Professional In-Reply-To: References: <72a0d590d6ba06f242d75c2e641820ec@postgrespro.ru> <6b4a7fb36c9956595a89a08e5368a9c5@postgrespro.ru> Message-ID: <01df6ca86c78e2c80b4e4d021c99d53a@postgrespro.ru> X-Sender: m.polyakova@postgrespro.ru User-Agent: Roundcube Webmail/1.2.4 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 > The current error handling is either "close connection" or maybe in > some cases even "exit". If this is changed, then the client may > continue execution in some unforseen state and behave unexpectedly. > We'll see. Thanks, now I understand this. >>> ISTM that the retry implementation should be implemented somehow in >>> the automaton, restarting the same script for the beginning. >> >> If there are several transactions in this script - don't you think >> that we should restart only the failed transaction?.. > > On some transaction failures based on their status. My point is that > the retry process must be implemented clearly with a new state in the > client automaton. Exactly when the transition to this new state must > be taken is another issue. About it, I agree with you that it should be done in this way. >>> The number of retries and maybe failures should be counted, maybe >>> with >>> some adjustable maximum, as suggested. >> >> If we fix the maximum number of attempts the maximum number of >> failures for one script execution will be bounded above >> (number_of_transactions_in_script * maximum_number_of_attempts). Do >> you think we should make the option in program to limit this number >> much more? > > Probably not. I think that there should be a configurable maximum of > retries on a transaction, which may be 0 by default if we want to be > upward compatible with the current behavior, or maybe something else. I propose the option --max-attempts-number=NUM which NUM cannot be less than 1. I propose it because I think that, for example, --max-attempts-number=100 is better than --max-retries-number=99. And maybe it's better to set its default value to 1 too because retrying of shell commands can produce new errors.. >>> In doLog, added columns should be at the end of the format. >> >> I have inserted it earlier because these columns are not optional. Do >> you think they should be optional? > > I think that new non-optional columns it should be at the end of the > existing non-optional columns so that existing scripts which may > process the output may not need to be updated. Thanks, I agree with you :) >>> I'm not sure that there should be an new option to report failures, >>> the information when relevant should be integrated in a clean format >>> into the existing reports... Maybe the "per command latency" >>> report/option should be renamed if it becomes more general. >> >> I have tried do not change other parts of program as much as possible. >> But if you think that it will be more useful to change the option I'll >> do it. > > I think that the option should change if its naming becomes less > relevant, which is to be determined. AFAICS, ISTM that new measures > should be added to the various existing reports unconditionnaly (i.e. > without a new option), so maybe no new option would be needed. Thanks! I didn't think about it in this way.. -- Marina Polyakova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers