Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tSLES-00Fosl-Ou for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Dec 2024 19:15:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tSLER-00EHm3-Vt for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Dec 2024 19:15:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tSKvC-00E8eS-CV for pgsql-bugs@lists.postgresql.org; Mon, 30 Dec 2024 18:55:22 +0000 Received: from 01a.relay.hey.com ([204.62.114.224]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tSKvA-001ICI-1K for pgsql-bugs@lists.postgresql.org; Mon, 30 Dec 2024 18:55:21 +0000 Received: from hey.com (bigip-vip-new.rw-ash-int.37signals.com [10.20.0.24]) by 01.relay.hey.com (Postfix) with ESMTP id EC0D8841C6; Mon, 30 Dec 2024 18:55:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hey.com; s=heymail; t=1735584919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=hKYxLjNZOOTDeEfSZqVq+1XbFdvdxDlnUFV243M73mA=; b=YnNj8Zt0oYaXK6PVoLVz95XzJeXw7p+jSbSeBzJoeNCaFrSimqFDA3WUzlYwa2fVnibPXe tX5bA2sze+MivGx+IAwo1uGvXJYoXOPZzaaycVRnXp3upaizSDMkmS56/VR78WrD09BcU+ hXe1HKm34F7aRzXSRRrlwS1b3eOnPxGifvBVlFQS9V7yiXFv/o51XmjxcUo6vxl4njMpst ZXl79uMfaNFiuFfExSqyEGINhUEG0ufag3J94dnXl9x4oirA35eRl1v0JSRRP5klMRJrrW kw83ROkapEA3CmvTmLGxflVqZxHS/tlD6BF6Md7uL9AY5mGijAFK2jtJ2J4m0A== Date: Mon, 30 Dec 2024 13:55:17 -0500 From: Michael Misiewicz To: pgsql-bugs@lists.postgresql.org, Tomas Vondra Message-ID: <18648bc4bdfda4532ec668b30c98d33ea1531a99@hey.com> In-Reply-To: Subject: Re: pg_upgrade cannot create btrfs clones on linux kernel 6.8.0 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_6772ec95c47bf_4f1f46888765"; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----==_mimepart_6772ec95c47bf_4f1f46888765 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Tomas,=C2=A0 Thanks for the great suggestion. That does seem like it'd be a likely cause of the issue, but not the case here (I was thinking if the bit was set, it might indicate an issue with the debian packages).=C2=A0 $ sudo lsattr /var/lib/postgresql/16/main/PG_VERSION ---------------------- /var/lib/postgresql/16/main/PG_VERSION Michael On December 29, 2024, Tomas Vondra wrote: > On 12/30/24 01:36, Michael Misiewicz wrote: > > ... > > I have validated that my filesystem supports reflinks: > >=C2=A0 > > $ dd of=3Dtempfile if=3D/dev/random bs=3D1M count=3D24 > > 24+0 records in > > 24+0 records out > > 25165824 bytes (25 MB, 24 MiB) copied, 0.0806355 s, 312 MB/s > > $ cp --reflink=3Dalways tempfile tempfile.reflink > > $ btrfs filesystem du -s tempfile tempfile.reflink > > Total Exclusive Set shared Filename > > 24.00MiB 0.00B 24.00MiB tempfile > > 24.00MiB 0.00B 24.00MiB tempfile.reflink > >=C2=A0 > >=C2=A0 > > And there's nothing interesting in `dmesg`.=C2=A0 > >=C2=A0 > > I ran this same command today on a macOS system (using apfs) and it > > worked great. I have no idea how to fix this problem and I'm curious > if > > anyone has any pointers.=C2=A0 > >=C2=A0 > > What does lsattr say about the source files? > > $ lsattr /var/lib/postgresql/16/main/PG_VERSION > > Chances are there is "C" attribute set, i.e. NOCOW. In that case I get > exactly the same failure : > > =C2=A0could not clone file between old and new data directories: \ > =C2=A0Invalid argument > > > regards > > --=C2=A0 > Tomas Vondra ----==_mimepart_6772ec95c47bf_4f1f46888765 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Tomas,=C2=A0

Thanks for the great suggestion. That does see= m like it'd be a likely cause of the issue, but not the case here (I = was thinking if the bit was set, it might indicate an issue with the debi= an packages).=C2=A0


$  sudo lsattr /var/lib/postgre=
sql/16/main/PG_VERSION
---------------------- /var/lib/postgresql/16/main/PG_VERSION
<= br>
Michael

On December 29, 2024, Tomas Vondra <t= omas@vondra.me> wrote:
On 12/30/24 01:36, Michael Mis= iewicz wrote:
> ...
> I have validated that my filesystem sup= ports reflinks:
>=C2=A0
> $ dd of=3Dtempfile if=3D/dev/random= bs=3D1M count=3D24
> 24+0 records in
> 24+0 records out
&= gt; 25165824 bytes (25 MB, 24 MiB) copied, 0.0806355 s, 312 MB/s
> = $ cp --reflink=3Dalways tempfile tempfile.reflink
> $ btrfs filesys= tem du -s tempfile tempfile.reflink
> Total Exclusive Set shared Fi= lename
> 24.00MiB 0.00B 24.00MiB tempfile
> 24.00MiB 0.00B 24= .00MiB tempfile.reflink
>=C2=A0
>=C2=A0
> And there'= ;s nothing interesting in `dmesg`.=C2=A0
>=C2=A0
> I ran this= same command today on a macOS system (using apfs) and it
> worked = great. I have no idea how to fix this problem and I'm curious if
&= gt; anyone has any pointers.=C2=A0
>=C2=A0

What does lsattr = say about the source files?

$ lsattr /var/lib/postgresql/16/main/P= G_VERSION

Chances are there is "C" attribute set, i.e. N= OCOW. In that case I get
exactly the same failure :

=C2=A0could= not clone file between old and new data directories: \
=C2=A0Invalid = argument


regards

--=C2=A0
Tomas Vondra
----==_mimepart_6772ec95c47bf_4f1f46888765--