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 1lCqT2-0002t8-OG for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Feb 2021 21:04:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCqT1-0001Ov-2l for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Feb 2021 21:04:07 +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 1lCqT0-0001Oo-NF for pgsql-hackers@lists.postgresql.org; Thu, 18 Feb 2021 21:04:06 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lCqSx-00072j-2K for pgsql-hackers@postgresql.org; Thu, 18 Feb 2021 21:04:06 +0000 Received: by mail-ed1-x52d.google.com with SMTP id s11so6085012edd.5 for ; Thu, 18 Feb 2021 13:04:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/lbhi47iKU9X0y+hNcRtVc3KEn6mlAyk/o3YgLi+g/s=; b=jhxpniWwwpITTbkKvswlJcTOTjRIx/a3qjiky/NJtJt7bPZRy1vjzbTKQuFkPARFOW LGaOiqrSNxzi224WKvB2JnKkDlQR3E07DKMI0CLvY/iKx0oowtxtBRoy4xjTht9/cvuN 2Ojt8JnlHG3noxAKGDHcXeZE+gEdBT/tJgAfZr7SWKSJxLoZMfkDtyKEQLWqIhc1H+SR 5/bplPc+gB30cn6S4HIwwMmflof8WTX1Ku7fsmS1+MqI3qblTyE9v6Ig/R/V8A2FATrJ ZkZYsmgWSpzz8Lk6LuljHNtuSWHPqzxCGz2D0dcKJXBajPcdItNk/WPl3JaWOMshWtph etoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/lbhi47iKU9X0y+hNcRtVc3KEn6mlAyk/o3YgLi+g/s=; b=IXQtXM7H9fLuFWRYuJHRQvnGNsL/9Q9u8T6DplEowEQxulffmn4+vX9Z655LyyBh1V zK9R+c1kmC6qRMvG4o7xQsNiRZOmmgadbWPbIijM4gkGREYR40t/kBe1k9tPMqhqiGai he/UFziwBi8yX1A+RMUYP8O1JL9xMerqJuTMmc0XK/XUpJbcS24jtRzu2UZwLOl5zfNe nqyxukWnVxyZUYAl71MMhkWDGrNMTt67vmpuODFYlqTPAoeI1BUD+D5PS5aLzfmRkChb shOffnb0/fHBgvewizOPvrbKXhIMY5pOyiKxbddrxttmSMIuWUMEkm2miFs6/4xBdp7G tGLg== X-Gm-Message-State: AOAM531vcKfLu792K53STeJCW3lHEJbVxa8TeNTdR8VQtqBeq5gdb4gY vJq/15FNYQlUv968DMCo1oaIwb4qTrmQlSYXk1V+1cCeJobCRrka9Y5A+Vt0Z860EjC48UwuVEC 0UKQw1XLWvos+rAsRDCKok/QF4xZx27DAapEHhvohX+i5039G9zVm7Zt3myEZ06acmbtjJruNIc nZSnbg36xUif5ADbkBIKYO110Hp0zPDS0b/lYk X-Google-Smtp-Source: ABdhPJwH17ge375ICTfdVRCPcW3mhAODqSr+IVnuYpJ/TqM0gUWrPSkUY283TwhBP803jWn6ZjIpUA== X-Received: by 2002:a05:6402:293:: with SMTP id l19mr6003780edv.4.1613682240642; Thu, 18 Feb 2021 13:04:00 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-253-127.net.upcbroadband.cz. [86.49.253.127]) by smtp.gmail.com with ESMTPSA id ke26sm1396723ejc.69.2021.02.18.13.03.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Feb 2021 13:03:59 -0800 (PST) Subject: Re: Improvements and additions to COPY progress reporting To: Matthias van de Meent Cc: Bharath Rupireddy , =?UTF-8?B?Sm9zZWYgxaBpbcOhbmVr?= , PostgreSQL Hackers , Justin Pryzby References: From: Tomas Vondra Message-ID: <0eb0a7e5-031d-51b6-b1c7-9804915d44f2@enterprisedb.com> Date: Thu, 18 Feb 2021 22:03:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/18/21 4:46 PM, Matthias van de Meent wrote: > Hi, > > Thank you all for the suggestions. PFA version 8 of the patchset, in > which I have applied most of your comments. Unless explicitly named > below, I have applied the suggestions. > Thanks. > > On Mon, 15 Feb 2021 at 17:07, Tomas Vondra > wrote: >> >> - The blocks in copyfrom.cc/copyto.c should be reworked - I don't think >> we do this in our codebase. > > I saw this being used in (re)index progress reporting, that's where I > took inspiration from. It has been fixed in the attached version. > Hmmm, good point. I haven't looked at the other places reporting progress and I only ever saw this pattern in old code. I kinda dislike these blocks, but admittedly that's rather subjective view. So if other similar places do this when reporting progress, this probably should too. What's your opinion on this? >> - I fir the "io_target" name misleading, because in some cases it's >> actually the *source*. > > Yes, I was also not quite happy with this, but couldn't find a better > one at the point of writing the initial patchset. Would > "io_operations", "io_port", "operates_through" or "through" maybe be > better? > No idea. Let's see if someone has a better proposal ... regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company