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 1v8l2N-002cfY-I1 for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Oct 2025 19:50: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 1v8l2L-002Fh3-GY for pgsql-bugs@arkaria.postgresql.org; Tue, 14 Oct 2025 19:50:20 +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 1v8l2L-002Fgu-7q for pgsql-bugs@lists.postgresql.org; Tue, 14 Oct 2025 19:50:20 +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 1v8l2I-001lqE-0C for pgsql-bugs@lists.postgresql.org; Tue, 14 Oct 2025 19:50:18 +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 59EJoFck1000042; Tue, 14 Oct 2025 15:50:15 -0400 From: Tom Lane To: Nathan Bossart cc: andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19086: pg_dump --data-only selects and do not uses index definitions for the dumped tables. In-reply-to: References: <19086-871ff11017d03dc5@postgresql.org> Comments: In-reply-to Nathan Bossart message dated "Tue, 14 Oct 2025 14:36:50 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1000040.1760471415.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 14 Oct 2025 15:50:15 -0400 Message-ID: <1000041.1760471415@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Tue, Oct 14, 2025 at 08:13:52AM +0000, PG Bug reporting form wrote: >> In case of system indexes corruption the collecting of index definition= s can >> take a really long time. > I don't think this qualifies as a bug, but avoiding pg_dump queries when > possible seems like a good idea. Is this a hypothetical problem or > something you've experienced? Even if it's been seen in the field, it hardly qualifies as a justification for complicating pg_dump's behavior. There's no reason to think that catalog corruption preferentially affects indexes, or does so in this particular way. Should we also not collect data on functions, types, etc etc? > Also, we need to be certain that nothing getIndexes() gathers is ever us= ed > for --data-only dumps. That seems plausible, but I haven't looked close= ly. Yeah, that's the main thing I'd worry about here. For example, ignoring some objects would likely lead to different conclusions about the database objects' dependency web, possibly leading to changes in dump order or other effects. Maybe there's no problem in practice, but this unsupported bug report doesn't really motivate me to do the analysis to see if it'd be all right. regards, tom lane