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 1mf99N-0005mF-49 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Oct 2021 23:13:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mf99L-0000XP-Pt for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Oct 2021 23:13:03 +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 1mf99L-0000VX-DW for pgsql-hackers@lists.postgresql.org; Mon, 25 Oct 2021 23:13:03 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mf99G-0004qc-9g for pgsql-hackers@lists.postgresql.org; Mon, 25 Oct 2021 23:13:02 +0000 Received: by mail-io1-xd2b.google.com with SMTP id z69so17740603iof.9 for ; Mon, 25 Oct 2021 16:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=2JHWl7zj8/tKADakXRPUVToO9rovoKaCee8Tu0rGcQU=; b=LnbLRa4zM9+v4aRfYtrvdjLjWgAnd4v4PaIo4WHjhqMmtGq0oC44VYQSavVqsqYrbA jyC4LEQrVYCQ/a0MCz6kkGpw17utwonB4ClWiGgbvJ6N7zQ8u0dxehW9pc/+Qe7mP0Ti a95sR3FF/3gY94O5Nzhf97p0R0FlTlWI9DYOMIgedHui7QpPQq0GpSJ7VqZnRwuhKeXy ouGC54r0Z/htnqHAcKUnGHU/SyziDyBLPgqES2wFQYWMczzDcdvGvet/ZNHlkS1mH7Nl v9AIGdBO3D1aYxJWSnMgF37QaImgPy5POKM3XrvQ/Gp2LMO1CMpZJzdEnSrsZVqDY85/ Y3HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=2JHWl7zj8/tKADakXRPUVToO9rovoKaCee8Tu0rGcQU=; b=HuQvdpfOH8mbppP0ufsoyH8w50EVNBtnAASYPgRctAw2xaouusPwUyMLl5DPSx90/f /JrKj3OYWCxwbmZWrLSKheJll47NT9RdJd2QxX+L1aDDpBwI52WCXcOE+tciiefi8uFb tugcQDG8+8IrGG1tdJye1BiGp94I8D0wvvrxrLVFoCnAqhlZPOV3orR4l3prb9DUIFyz mbZ9qQs/yJZJYGN9Chjbo2msiZFeD5KMxssJTD72wEFRM2LGhufrpDseJsfsoeF+EvrB XIr9KLHxcLrQ9l4w4nTYfSMxtp+Slc1GxdliVOnK94mYdKoNHtQbcPxWKKjecLBDdIFS G3mQ== X-Gm-Message-State: AOAM533Cjo7j7Kr4m+5qqqE7xi0g2KmFqMNLpn/1rYz+79FSvC3MAdhd i43kKNNHQK54GNJN+jttsFFqig== X-Google-Smtp-Source: ABdhPJxftxcrms4uusl7sQSK0lYAt7+K1VzrjaIiV5wKFMn4S+WJ22ltb6J9oOgfY146BtX7MNfv7g== X-Received: by 2002:a6b:5814:: with SMTP id m20mr12675204iob.188.1635203577343; Mon, 25 Oct 2021 16:12:57 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id h11sm9340068ili.7.2021.10.25.16.12.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Oct 2021 16:12:57 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 5F6B88008E0; Mon, 25 Oct 2021 18:12:56 -0500 (CDT) Date: Mon, 25 Oct 2021 18:12:56 -0500 From: Justin Pryzby To: Tom Lane Cc: Andrew Dunstan , Robert Haas , Alvaro Herrera , pgsql-hackers@lists.postgresql.org, Andres Freund Subject: Re: pg_dump versus ancient server versions Message-ID: <20211025231256.GA31568@telsasoft.com> References: <202110222351.3f42l5fgo3lw@alvherre.pgsql> <3783090.1635111977@sss.pgh.pa.us> <3883429.1635171820@sss.pgh.pa.us> <629628fa-7c26-0b67-2c01-767aa0c1e721@dunslane.net> <3996712.1635176331@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3996712.1635176331@sss.pgh.pa.us> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Oct 25, 2021 at 11:38:51AM -0400, Tom Lane wrote: > Andrew Dunstan writes: > > On 10/25/21 10:23, Tom Lane wrote: > >> (Hmmm ... but disk space could > >> become a problem, particularly on older machines with not so much > >> disk. Do we really need to maintain a separate checkout for each > >> branch? It seems like a fresh checkout from the repo would be > >> little more expensive than the current copy-a-checkout process.) > > > If you set it up with these settings then the disk space used is minimal: > >      git_use_workdirs => 1, > >      rm_worktrees => 1, > > Maybe we should make those the defaults? AFAICS the current > default setup uses circa 200MB per back branch, even between runs. > I'm not sure what that is buying us. Maybe git's shared/"alternates" would be helpful to minimize the size of .git/objects? I'm not sure - it looks like the BF client does its own stuff with symlinks. Is that for compatibility with old git ? https://github.com/PGBuildFarm/client-code/blob/main/PGBuild/SCM.pm If you "clone" a local location, it uses hard links by default. If you use --shared or --reference, then it uses references to the configured "alternates", if any. In both cases, .git/objects requires no additional space (but the "checked out" copy still takes up however much space). $ mkdir tmp $ git clone --quiet ./postgresql tmp/pg $ du -sh tmp/pg 492M tmp/pg $ rm -fr tmp/pg $ git clone --quiet --shared ./postgresql tmp/pg $ du -sh tmp/pg 124M tmp/pg -- Justin