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 1l59I0-0006oa-IN for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Jan 2021 15:32:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l59Hz-0004Dh-EZ for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Jan 2021 15:32:55 +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 1l59Hz-0004Da-8B for pgsql-bugs@lists.postgresql.org; Thu, 28 Jan 2021 15:32:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l59Ht-0003bZ-1O for pgsql-bugs@lists.postgresql.org; Thu, 28 Jan 2021 15:32:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 10SFWkjV2546667; Thu, 28 Jan 2021 10:32:47 -0500 From: Tom Lane To: tomas.dalebjork@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16842: pg_dump uses seek calls on pipe files: suggesting adding a flag to disable seek calls In-reply-to: <16842-381bd64d2f0f68db@postgresql.org> References: <16842-381bd64d2f0f68db@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 28 Jan 2021 12:19:52 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2546665.1611847966.1@sss.pgh.pa.us> Date: Thu, 28 Jan 2021 10:32:46 -0500 Message-ID: <2546666.1611847966@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > It would be good to add a flag to disable this feature, as some devices does > not support seek calls, for example streaming devices such as a tape > drive. That seems like an extremely niche use-case, so I'm unexcited about adding a switch for it. You can get the same results with a pipe, as your quoted response from Red Hat support suggests. Note that disabling seeking is not all that desirable in the first place, as it will result (for -Fc output) in a dump file that is significantly restrictive to restore performance, due to lack of data offset pointers. You might really be best advised to rethink whether you want to write directly to an unseekable device, rather than to a temp file you transfer to tape later. regards, tom lane