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 1kPuTO-0004yk-SP for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Oct 2020 21:26:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kPuTN-0000QD-K8 for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Oct 2020 21:26:13 +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 1kPuTN-0000Q6-Dy for pgsql-bugs@lists.postgresql.org; Tue, 06 Oct 2020 21:26:13 +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 1kPuTG-0002jH-VJ for pgsql-bugs@lists.postgresql.org; Tue, 06 Oct 2020 21:26:12 +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 096LQ4Ta2007401; Tue, 6 Oct 2020 17:26:04 -0400 From: Tom Lane To: Stephen Frost cc: cam.daniel@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16655: pg_dump segfault when excluding postgis table In-reply-to: <1995213.1602011218@sss.pgh.pa.us> References: <16655-5c92d6b3a9438137@postgresql.org> <1819571.1601937068@sss.pgh.pa.us> <20201006163318.GX3063@tamriel.snowman.net> <1909344.1602003707@sss.pgh.pa.us> <1995213.1602011218@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 06 Oct 2020 15:06:58 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2007399.1602019564.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Oct 2020 17:26:04 -0400 Message-ID: <2007400.1602019564@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > 0001 is sufficient to get past the proposed test case in 0002. However, > I think processExtensionTables is also buggy here. It does need to set > the "interesting" flag to true if it decides we need to dump the table's > data, because we have to have the per-attribute data to support that, > and "interesting" might not ever get set true on the table otherwise. > But *it is not OK to set "interesting" to false just because we don't > decide to dump the data*. If it's been set true for some other reason, > that other reason didn't just vanish. So I think we also need 0003. Upon excavating in the git history, I discovered that that error was introduced in 3eb3d3e78 [1], which explains why the OP thought it was new in v13 --- no other branch has shipped the buggy code yet. It's not entirely clear to me why we don't get a crash on the case in pre-v12 branches, but I'm inclined to apply these patches all the way back anyway, as they definitely seem like robustness improvements whether or not a given branch accidentally fails to fail. regards, tom lane [1] https://www.postgresql.org/message-id/flat/18048b44-3414-b983-8c7c-916= 5b177900d%402ndQuadrant.com