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 1ut9nJ-001kTA-PW for pgsql-general@arkaria.postgresql.org; Mon, 01 Sep 2025 19:02:22 +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 1ut9nI-000tdh-Vb for pgsql-general@arkaria.postgresql.org; Mon, 01 Sep 2025 19:02:21 +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 1ut9nH-000tdZ-Ti for pgsql-general@lists.postgresql.org; Mon, 01 Sep 2025 19:02:21 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ut9nG-0002Yi-1f for pgsql-general@lists.postgresql.org; Mon, 01 Sep 2025 19:02:19 +0000 Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 29388EC061F; Mon, 1 Sep 2025 15:02:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Mon, 01 Sep 2025 15:02:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1756753337; x=1756839737; bh=uoU3Hpw15EN2wEuLcw/kUful9jQ8J1vT84pKVUxjMXI=; b= imwxfWF4vFZIAnlOThmTXaEVTDp9n7ImIypeSyoDu3356LAWuD1He7Ta2rizhfRY IiDEw9vwcv/VUt2LCdVJX2//pWLlerLWynFGVbyA46mm9kXK9+apOQpVZIeCoDbz +C5RXnu52Oe7VYiCU4gtoZT7YcRpoEkrUN9TuHiE6xo6qPQWswksxBxOyPO7zLZI lDxiwJM6F003jX8kS6f3tp4hmeMtb0X1kM/o7j3sOzh6Ctc/h9nkBT3UWXf+0jQC ELUKQtDWi3iVAglo66/vGa01xJFUEDrK6vgpTDfdP3G8F1UMeNWUqC3xoN8UeZLn EeBy8e5VeJDAH1HVRexH+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1756753337; x= 1756839737; bh=uoU3Hpw15EN2wEuLcw/kUful9jQ8J1vT84pKVUxjMXI=; b=h Bsc4sK4fVJkWiP5KpTCtxLbNpEc2A+TpOnVF015HI3voxgTWDGrRBPGj7O980pFm /IzeG6M+nauE2upfGe4OcCu9SioRNMPb97iXRsFFfXWLhrGyBk36393FS7WQVTfX Fcl0lelaxoRswiN/NlT81Xr8OlvZVThFsvMKsoNo7W96/ADF2x40mDA+WlOU6vAa ABxg7Y1AxbC34K1QhAnY/d/GivEDdZ/V7R6oINuOjw86OzIgHQdYMGDtaQQu/1ss 8D1KikuzrTpb1yVlGzMvPQ/Csyri3v1LGOI1T5RP2VhTFDvuVCn3sdU5Ctk0opD0 I1olnhqR7HO/m7rqbIOdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduledvleefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejre dttddvjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefhveeihfevle fffedthedukeevfefhfedtgeeifeevteffgfefhedtffetudettdenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvg hrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhp ohhuthdprhgtphhtthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhspdhrtghpthhtoh epjhhimhhishesghhmgidrnhgvthdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghl sehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 1 Sep 2025 15:02:16 -0400 (EDT) Message-ID: <46723eba-bf31-4789-bf50-9f53bc7bdc5f@aklaver.com> Date: Mon, 1 Sep 2025 12:02:15 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: In-order pg_dump (or in-order COPY TO) To: Tom Lane Cc: Dimitrios Apostolou , pgsql-general@lists.postgresql.org References: <3541781s-75o7-26pp-46pp-qs54o4406192@tzk.arg> <4ss66r31-558o-qq24-332q-no351p7n5osr@tzk.arg> <0dc17a73-2372-4613-a50e-610ae7d02b93@aklaver.com> <84F8AAF7-8FC6-463C-827F-5D09E24EA911@gmx.net> <366773.1756749256@sss.pgh.pa.us> Content-Language: en-US From: Adrian Klaver In-Reply-To: <366773.1756749256@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/1/25 10:54, Tom Lane wrote: > Adrian Klaver writes: >> I did some digging in the code and see that the TOC is more then that, >> it stores a range of data. Still have not part where the offsets are >> ignored for writes to stdout, but will keep on digging. > > The TOC is initially written out with zeroes for the offsets. > Then the per-table data parts are written out, tracking where > each one begins. At the end, if the output file is seekable, > pg_dump seeks back to the start and re-writes the whole TOC > section, now with data offsets populated. But output to a > pipe won't be seekable. Got it, thanks. > > regards, tom lane -- Adrian Klaver adrian.klaver@aklaver.com