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 1kAeyM-0003ki-TY for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 19:51:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kAeyL-00061C-Lu for pgsql-admin@arkaria.postgresql.org; Tue, 25 Aug 2020 19:51:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAeyL-000615-EU for pgsql-admin@lists.postgresql.org; Tue, 25 Aug 2020 19:51:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAeyJ-0007TW-09 for pgsql-admin@postgresql.org; Tue, 25 Aug 2020 19:51:09 +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 07PJp39J2762820; Tue, 25 Aug 2020 15:51:03 -0400 From: Tom Lane To: Wells Oliver cc: Stephen Frost , Alvaro Herrera , pgsql-admin Subject: Re: Odd pg dump error: cache lookup failure In-reply-to: <2762015.1598384009@sss.pgh.pa.us> References: <20200824231338.GA30623@alvherre.pgsql> <20200824231621.GA29590@tamriel.snowman.net> <2748788.1598376276@sss.pgh.pa.us> <2760667.1598382327@sss.pgh.pa.us> <2762015.1598384009@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 25 Aug 2020 15:33:29 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2762818.1598385063.1@sss.pgh.pa.us> Date: Tue, 25 Aug 2020 15:51:03 -0400 Message-ID: <2762819.1598385063@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Wells Oliver writes: >> And refreshing materialized views during the dump process wouldn't cause >> this? > matviews can't be part of inheritance trees AFAIR, so we'd need some > other theory to explain it that way. Oh wait a second. Matviews can have indexes, and getTables doesn't lock them (because we don't allow LOCK TABLE on views). So it's fairly clear that you could get here with no lock if 1152770777 is a matview. However, it's still not entirely clear how a refresh could trigger the observed error. We certainly aren't changing the matview's OID when we do that. Do we rewrite the pg_attribute entries anyway? And even if we do, why would there be a problem? Are your refreshes using CONCURRENTLY? regards, tom lane