Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fTBva-0005pg-JE for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Jun 2018 19:59:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fTBvZ-0001KD-0d for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Jun 2018 19:59:33 +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.89) (envelope-from ) id 1fTBvY-0001K3-Po for pgsql-hackers@lists.postgresql.org; Wed, 13 Jun 2018 19:59:32 +0000 Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fTBvV-0007Z4-8a for pgsql-hackers@postgresql.org; Wed, 13 Jun 2018 19:59:32 +0000 Received: by mail-qt0-x231.google.com with SMTP id o9-v6so3631569qtp.3 for ; Wed, 13 Jun 2018 12:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=oyNUfIbrXdo85idYGpwD5b1jZ6lBn4mrqgwfXEqOhYM=; b=wn0oHY2IuCwegy+lVyMqjJzzU3KcGjc506dDlyQ8T1R/ebWumkekqu8qExMaci4m6y io98FNDu8FdCZsl7RaBOR9mgH2y4fN9lL/176zfLVWNg/sIY4t0MEEwcQ0viQozzFIcn 89sIDq8HwoFSPHqeKuvP7YMmVldV0MZHgY7zsAEAvlr45yNe9LlrsuTsFd5a5WI/3qp/ CWXGkbzOKst4H3LeswUgvQdICN2K/L9M8TW+IIFmuQO7AVQeuSxdWe22dTZWjxHeMOVn wCeXzgKHJwDcjuD3Q6rocXo43jQW+5kS6fGA3cAgctkv0DzE1AgEEClqjGMCSLVlTFtM te8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=oyNUfIbrXdo85idYGpwD5b1jZ6lBn4mrqgwfXEqOhYM=; b=jh7N3h828eWmntw9rcHGtaQuMU0UNr8qDbpCVb8Uk2xGKkZwaCOZ+rfZNCXPzxnIpJ xVBUzI6PF71q/hSkqVveNyIS2RzFyDFwtNJokq5YPZPoM0faVUmGxZFKB0UVCMefXAvl 4bV5Ra1eaRivC9dmqBuF1Lg+TAV/4MqRAHT9R6m50CebzLUqYIYtYHmqNJlTwR8Y0Srg rQaJAFjUYL0t601k7TKI0zw+2H6VwTa6oltFe1R+1x2XSgSKQ9QcOw6/SSr/tZHYaTyM uc/yxa77TBzcTz+0mYWxqg/nHDXZOYNh67A4ASDb6CW6bA+HO9n6khSraFaK8FQSAef1 YZmQ== X-Gm-Message-State: APt69E33rwWSPkjqLLkDurE5dk0AKmZYjfmKaHzgBWb0ckm41FTYD3C6 PkLTOgPmJlC906c6ATRi+zwFf7ru X-Google-Smtp-Source: ADUXVKJz+/zwQ9vbhzZmdts+SOID9hRuM+olYw6Rl48QSQvLINmg7CRLlQ0zuj2+0FdcyIQxHBj2zw== X-Received: by 2002:ac8:36d:: with SMTP id w45-v6mr6017393qtg.382.1528919967113; Wed, 13 Jun 2018 12:59:27 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id h43-v6sm3164044qth.6.2018.06.13.12.59.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jun 2018 12:59:26 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id C81AC9F7; Wed, 13 Jun 2018 15:59:24 -0400 (-04) Date: Wed, 13 Jun 2018 15:59:24 -0400 From: Alvaro Herrera To: Fabien COELHO Cc: Marina Polyakova , pgsql-hackers@postgresql.org, Ildus Kurbangaliev , Teodor Sigaev Subject: Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors Message-ID: <20180613195924.tcrdisjrat2se2rt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Jun-13, Fabien COELHO wrote: > > > > With that, is there a need for elog()? In the backend we have > > > > it because $HISTORY but there's no need for that here -- I > > > > propose to lose elog() and use only ereport everywhere. > > See commit 8a07ebb3c172 which turns some ereport into elog... For context: in the backend, elog() is only used for internal messages (i.e. "can't-happen" conditions), and ereport() is used for user-facing messages. There are many things ereport() has that elog() doesn't, such as additional message fields (HINT, DETAIL, etc) that I think could have some use in pgbench as well. If you use elog() then you can't have that. Another difference is that in the backend, elog() messages are never translated, while ereport() message are translated. Since pgbench is translatable I think it would be best to keep those things in sync, to avoid confusion. (Although of course you could do it differently in pgbench than backend.) One thing that just came to mind is that pgbench uses some src/fe_utils stuff. I hope having ereport() doesn't cause a conflict with that ... BTW I think abort() is not the right thing, as it'll cause core dumps if enabled. Why not just exit(1)? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services