From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-hackers@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Subject: Re: pg_dump versus ancient server versions
Date: Mon, 25 Oct 2021 18:12:56 -0500
Message-ID: <20211025231256.GA31568@telsasoft.com> (raw)
In-Reply-To: <3996712.1635176331@sss.pgh.pa.us>
References: <CA+TgmoboH6=SgWHPddv_8ie91Qf2ECKSvg-72aYajKb2gyLYQg@mail.gmail.com>
<202110222351.3f42l5fgo3lw@alvherre.pgsql>
<CA+TgmobB8cj30z6dzEf5xNTxzGRNGmkJsCr3nv_Hneo0o5kozg@mail.gmail.com>
<3783090.1635111977@sss.pgh.pa.us>
<CA+TgmobQxeGVtgxQz_OxdgCO4r=Tb2SaCh9FJ8Dxjaq9DxHH_g@mail.gmail.com>
<3883429.1635171820@sss.pgh.pa.us>
<629628fa-7c26-0b67-2c01-767aa0c1e721@dunslane.net>
<3996712.1635176331@sss.pgh.pa.us>
On Mon, Oct 25, 2021 at 11:38:51AM -0400, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, robertmhaas@gmail.com, alvherre@alvh.no-ip.org, andres@anarazel.de
Subject: Re: pg_dump versus ancient server versions
In-Reply-To: <20211025231256.GA31568@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox