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 1uZvEN-00AJPa-Lp for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jul 2025 17:38:47 +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 1uZvEL-00FQW1-CP for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jul 2025 17:38:46 +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 1uZvEL-00FQVt-2b for pgsql-hackers@lists.postgresql.org; Thu, 10 Jul 2025 17:38:45 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uZvEK-006bwh-0A for pgsql-hackers@lists.postgresql.org; Thu, 10 Jul 2025 17:38:44 +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 56AHce7X1605841; Thu, 10 Jul 2025 13:38:40 -0400 From: Tom Lane To: Nathan Bossart cc: Nitin Motiani , Hannu Krosing , PostgreSQL Hackers Subject: Re: pg_dump sort priority mismatch for large objects In-reply-to: References: Comments: In-reply-to Nathan Bossart message dated "Thu, 10 Jul 2025 12:31:56 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1605839.1752169120.1@sss.pgh.pa.us> Date: Thu, 10 Jul 2025 13:38:40 -0400 Message-ID: <1605840.1752169120@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Thu, Jul 10, 2025 at 06:05:26PM +0530, Nitin Motiani wrote: >> I looked through the history of this to see how this happened and if it >> could be an existing issue. Prior to a45c78e3284b, dumpLO used to put large >> objects in SECTION_PRE_DATA. That commit changed dumpLO and also changed >> addBoundaryDependencies to move DO_LARGE_OBJECT from pre-data to data >> section. Seems like since then this has been inconsistent with >> pg_dump_sort.c. I think the change in pg_dump_sort.c should be backported >> to PG17 & 18 independent of the state of the larger patch. > +1, if for no other reason than we'll need it to be below PRIO_TABLE_DATA > for the speed-up-pg_upgrade-with-many-LOs patch [0]. Does anyone see any > problems with applying something like the following down to v17? That's clearly an oversight in a45c78e3284b. I agree that fixing pg_dump_sort.c to match shouldn't create any functional difficulties. It might make the topological sort step marginally faster by reducing the number of ordering violations that have to be fixed. regards, tom lane