Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6a7q-0004pe-GR for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Aug 2020 13:52:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6a7p-0005aF-E1 for pgsql-hackers@arkaria.postgresql.org; Fri, 14 Aug 2020 13:52:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6a7p-0005a8-6r for pgsql-hackers@lists.postgresql.org; Fri, 14 Aug 2020 13:52:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6a7i-0002ys-LC for pgsql-hackers@postgresql.org; Fri, 14 Aug 2020 13:52:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 07EDpiYP572251; Fri, 14 Aug 2020 09:51:45 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers Subject: Re: Newline after --progress report In-reply-to: <82b539e5-ae33-34b0-1aee-22b3379fd3eb@iki.fi> References: <82b539e5-ae33-34b0-1aee-22b3379fd3eb@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Fri, 14 Aug 2020 10:57:10 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <572249.1597413104.1@sss.pgh.pa.us> Date: Fri, 14 Aug 2020 09:51:44 -0400 Message-ID: <572250.1597413104@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Heikki Linnakangas writes: > While hacking on pg_rewind, this in pg_rewind's main() function caught > my eye: Good catch. > Attached is a patch to fix this, as well as a similar issue in > pg_checksums. pg_basebackup and pgbench also print progres reports like > this, but they seem correct to me. I wonder whether it'd be better to push the responsibility for this into progress_report(), by adding an additional parameter "bool last" or the like. Then the callers would not need such an unseemly amount of knowledge about what progress_report() is doing. regards, tom lane