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 1kDFp0-0001QS-Es for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 23:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDFoz-00006w-7Y for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 23:36:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDFoy-00006o-Rb for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2020 23:36:13 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kDFor-00058O-UY for pgsql-hackers@postgresql.org; Tue, 01 Sep 2020 23:36:11 +0000 Received: by mail-qt1-x842.google.com with SMTP id n10so2333484qtv.3 for ; Tue, 01 Sep 2020 16:36:05 -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=qick6J3VblYacOA8u9jITQNpaIqzDJmwRs40a7jopOo=; b=ejN3FtMfmTSru3z9HfQm8ddPQ5McvHCnLecQyhuP2BXsvSIs3cApikxAvnQcvPWo3N FpszxK5g2o7ajo7GNelGKeN88WjR9QOJneT+AUPDwXxN/BcytV7vQPNfx8YsB2GIt/hu ZE+HOScqri8kfayRjM+T9kDlUd441ddqIrCA6EpEGB1uzKoW1dFPTj8X/RbkJKtu/ao7 h5ouqwSJy6ocoLFbwoMj3mUkbjsXutcopv2P3iDMTDv+zrv3tBzhMvJPeiW2NqOpzrqU vcNElCS6oO0aTBAl8j5ECY2v1KjkKCWLjH/itAuoDy6qsLrikECctgZwpejcSSc4LKkA PAXg== 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=qick6J3VblYacOA8u9jITQNpaIqzDJmwRs40a7jopOo=; b=dcNaIU5PFHyhWCIS1JUTn2EX3kfJGXATJv9xF1OwBjsLD1YALPNYSESu9ihHhtRW8j mYwWK+q7oedvhAATKi3Wm0QD2nDn+ri/wwG/m0bmHpM4/WCceoN8FTse8Uhue+IbOlVI GUEn1BRpwjNbenQ+0s+addPULedJCkOCoCmSbX06iEFjsRPvWqvwx8Qv5ZN6PKbl+GRB 6TuskxuEnNpsqZ/JCYH5mH0V3w/qg0OKaQoImIvkYTxoxfeXO9qbujR91xshRCDsn+c4 t3bXzVOQKPbXQXxzd5DX4DfsK2ID5EJ9XYuUVI4abB4a7TM5mElLFQa0/hdRgCxPIYvp IDtg== X-Gm-Message-State: AOAM532xxFF2nz2OwCltdUKlhhMny+hF9CIg/mGZKz/6XMpv8WqxCTCz leQmFOgCK0pzcZezIk9jR8/nCm6wP/Nbqg== X-Google-Smtp-Source: ABdhPJygpb3o9LByd5rUZ+9tfTkLRJUiG9A2ohxbZHPcVjzPCVxjPBWCkw3+XSVUlgy7Xx1WNoe1sw== X-Received: by 2002:ac8:1b92:: with SMTP id z18mr4218528qtj.265.1599003364879; Tue, 01 Sep 2020 16:36:04 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([190.95.19.47]) by smtp.gmail.com with ESMTPSA id a67sm3172335qkd.40.2020.09.01.16.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2020 16:36:04 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id D3C202A1557; Tue, 1 Sep 2020 19:36:02 -0400 (-04) Date: Tue, 1 Sep 2020 19:36:02 -0400 From: Alvaro Herrera To: Peter Geoghegan Cc: Jeff Davis , PostgreSQL Hackers Subject: Re: logtape.c stats don't account for unused "prefetched" block numbers Message-ID: <20200901233602.GA31048@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: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Jul-30, Peter Geoghegan wrote: > Commit 896ddf9b added prefetching to logtape.c to avoid excessive > fragmentation in the context of hash aggs that spill and have many > batches/tapes. Apparently the preallocation doesn't actually perform > any filesystem operations, so the new mechanism should be zero > overhead when "preallocated" blocks aren't actually used after all > (right?). However, I notice that this breaks the statistics shown by > things like trace_sort, and even EXPLAIN ANALYZE. > LogicalTapeSetBlocks() didn't get the memo about preallocation. This open item hasn't received any replies. I think Peter knows how to fix it already, but no patch has been posted ... It'd be good to get a move on it. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services