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.98.2) (envelope-from ) id 1xUJbd-00000000tmm-2Lbl for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Nov 2026 08:04:26 +0000 Received: from localhost ([127.0.0.1]:52910 helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xUJbd-00000006s4a-01yk for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Nov 2026 08:04:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]:43036) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xUJbc-00000006s4P-32lj for pgsql-hackers@lists.postgresql.org; Fri, 20 Nov 2026 08:04:24 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xUJba-00000000hyK-0q5c for pgsql-hackers@postgresql.org; Fri, 20 Nov 2026 08:04:24 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-c4cac7a7d3cso94788666b.3 for ; Fri, 20 Nov 2026 00:04:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795161861; x=1795766661; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=1Ip++8BLtkVlUtDFYxFL5fX1Jb0JAc/QyjNNvtXqK+g=; b=ImyU2jIuN168MyVEHeYX+bEc5j5FG4y+wnMZiRylX2OCcEmIu6n03vGAxLmz6cA5XZ CNs24XIJnYKgCccCTOyR6EuIRzb3/UBOgoI4neFwbyaFTSdhjv2++IQpD7gU8F4tHwsP 15dZk3dIsQ8mYWVbmR4NEYCUJXmz+rW5Abr9bqMWfgE2BVLoW79DUe04Q/sW/OGY/fws A+2qsTqKCAry7ch9tM7GFIrPFszrZe/X6xAiFEVniUzup1lvTVPLD5iezmDi/fwWehxQ PE62UMWtEf01qt6d5PyXlvDuhPnsO4k6kceVq57+0qdUxZgCTRtwHIzyqex5AVwtiYRH C5ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795161861; x=1795766661; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=1Ip++8BLtkVlUtDFYxFL5fX1Jb0JAc/QyjNNvtXqK+g=; b=zl6V9MrYCLEkOlDab6SLIV4HnnOW4WKmhQsa2zsd6JHGXXwfSASW2gvmlzlfWeAL+D igH7OBgjyU3KrINbrtXKZ85k6UBXK/wmdNWZ26RYAWhafApW/HmNBgaW+c32YIig23o6 /bslhVmUiJlGm4oGAwZaU9w1pQQgN1JGjC0bluKUfaUcKqN6RBFC0fM9vm0tkGfmXk8M +xOD/ZBo357yJwmDHGAfffcUVczTkewGL/fZSffxBTaKhFp6QpSrNCSoyP9fbzgHFEkS vqI5atxxYWMmnR4AdRUwR/0qbANQxKIwiMTiL/PwS0kugrJO1zZrPD7jX+eu7m7tCd14 D2Sg== X-Gm-Message-State: APuU4Z8dtlaRiiqm/Hb0VMaQ7IZPLKVZUru6EfzGAAgukSwTAXH+LZiu h2fgrEESYgBZVvnl0F4IL+IAO0PheFAGk83/svj318OxGC/6r1q5bwdyEgCMYg== X-Gm-Gg: AYBFou3kO3V6yaw1tYsHF9FxRvIJGxpVVeWq87cYj0X8FBxFLdxi9Q+cXr8h539p/sT 1uJsggP1zQ8qmcImQxOa7IB7EO0v+rhoIKmbaTh+y2qNfQGA62c6eOdBudLIXsFVDHwCEDG1mWk qHtnwp+7/INrP9V0IaaIiRLrCAmI4CqhxzzHtWCsE3w3c/v1GUWdPeXs40D5thMvGeCZqDJVUwI lPZTIuG1lnODlj3uQJNVrkwrP3igRPLcVqy1d8jYjdqhX588EEGfYmVfQdFfp3jk+mkNnpS+tVe y8r6al5BRemdSMWqdA8A/otqzRimISAhECzKOztGxtENSmhkifcF4z4sIdnXLC4KJiqBtuFi/eK /7QLDOC1koHVD/h34c9hfhBndz4GwS3UiCU71Xo35b1EYwzXFzyz85dGvd66K0r1oINpaAWVy4w 48o6HP6dF9fxugs3t7Ss74o2IfYZ8a0lxI2H3Zjotm3sKrc4FoeTKrwHDggScoe2vZaVFjA/xHS UWyg+/TemSm1J80tyHwGVkbwxQLewq9tIT5ucSRfbsbTEt08x3h6cBZMmuJMAb4C1cZi/xZiW8O 2AYebqjOR11VaKNYorp+IF3R7lscGu1QYfPvRyw+9B6swWRqo/r0KzqvSrpVXSJnHZu9fW5LNcw gyZDkW7JisHMS X-Received: by 2002:a17:906:f885:b0:c4c:fd37:bb0c with SMTP id a640c23a62f3a-c513aaea94amr148381866b.29.1795161860664; Fri, 20 Nov 2026 00:04:20 -0800 (PST) Received: from bdtpg (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab658e2c8csm4222584f8f.2.2026.11.20.00.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Nov 2026 00:04:20 -0800 (PST) Date: Fri, 20 Nov 2026 08:04:19 +0000 From: Bertrand Drouvot To: Nathan Bossart Cc: pgsql-hackers@postgresql.org Subject: Re: pg_restore fails on extracted tar archives with large objects Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Nov 19, 2026 at 03:23:32PM -0600, Nathan Bossart wrote: > The following commands produce an error: > > createdb src > createdb dst > psql src -c "select lo_from_bytea(1, '\xff')" > pg_dump -Ft -f d.tar src > mkdir ex > tar xf d.tar -C ex > pg_restore -Fd -d dst ex > > pg_restore: error: could not open large object TOC file "ex/2966.dat" for input: No such file or directory > > This is because the tar format puts NNN.dat instead of blobs_NNN.toc into > the BLOBS TOC entry. That was harmless until commit a45c78e328 (v17) > taught the directory format's restore code to use the file name in the TOC > entry. Commit 166b4f4560 fixed a similar problem for directory-format > dumps made by versions before v12. > > The attached patch fixes it by constructing the file name instead of using > the one in the TOC entry. It looks like _PrepParallelRestore() is affected by the same issue. The stat() fails, leaving the BLOBS entry’s dataLength at zero, so the parallel scheduler cannot use the intended size estimate. Should this use the same filename construction as _LoadLOs()? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com