Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iV48X-0007U6-3n for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2019 01:41:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iV48V-00055L-T7 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2019 01:41:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iV45K-0000ga-61 for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2019 01:38:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iV45F-0005RW-GJ for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2019 01:38:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xAE1bxgm015229; Wed, 13 Nov 2019 20:37:59 -0500 From: Tom Lane To: Mark Dilger cc: pgsql-hackers@lists.postgresql.org, Tomas Vondra Subject: Re: Missing dependency tracking for TableFunc nodes In-reply-to: <997cbcae-7739-f871-84a0-1192380abb54@gmail.com> References: <18427.1573508501@sss.pgh.pa.us> <997cbcae-7739-f871-84a0-1192380abb54@gmail.com> Comments: In-reply-to Mark Dilger message dated "Wed, 13 Nov 2019 15:00:03 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15227.1573695479.1@sss.pgh.pa.us> Date: Wed, 13 Nov 2019 20:37:59 -0500 Message-ID: <15228.1573695479@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Mark Dilger writes: > On 11/11/19 1:41 PM, Tom Lane wrote: >> I happened to notice that find_expr_references_walker has not >> been taught anything about TableFunc nodes, which means it will >> miss the type and collation OIDs embedded in such a node. > I can consistently generate errors like the following in master: > ERROR: cache lookup failed for statistics object 31041 This is surely a completely different issue --- there are not, one hopes, any extended-stats OIDs embedded in views or other query trees. I concur with Tomas' suspicion that this must be a race condition during DROP STATISTICS. If we're going to allow people to do that separately from dropping the table(s), there has to be some kind of locking around it, and it sounds like there's not :-( regards, tom lane