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 1gvm0Q-0003UK-3x for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Feb 2019 16:42:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gvm0O-0006r3-UK for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Feb 2019 16:42:56 +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 1gvm0M-0006af-Qz for pgsql-bugs@lists.postgresql.org; Mon, 18 Feb 2019 16:42:56 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gvm0J-0002jO-BO for pgsql-bugs@lists.postgresql.org; Mon, 18 Feb 2019 16:42:53 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 11CAA2214E; Mon, 18 Feb 2019 11:42:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 18 Feb 2019 11:42:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=cH7OFXkC8KTgqXKfHHTOBzjUt1P WocoM7NZ7Os05zK8=; b=lpJGfkwSUysTe84ktzAR5QFhTeZw3pqHZHgu9jNq4pz Z8rg0NB0T+AebtCSzoRK/nuNzULgYdUVWCmzaAByk4tKv/wbYm7wzmHWeT25PTOs NllPvb2ihvrZ0/SesC3PZA4/Y+CgPOA6Xb2srntrixIwJUnbvDTWqb2tWyAt6646 NOtvP3CPfi4CTBsV4IeRdd1jTmfLQUHetgL9AyDtVrnkoQ2qm7cbWNis3NEYSutg 9EUwJXNq3OBUoWMY/OxAEwp7ANvwyroFu4Qrrr3XsSpBYWrc48HtvGxCJnaIm3Qm 7DlCb7aTlqq2nAkjFkBFipSb7Oah90psLCorQE3CBvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cH7OFX kC8KTgqXKfHHTOBzjUt1PWocoM7NZ7Os05zK8=; b=4/CL2YdSimN5G2D9Oiw9GC 7h9JTWPdc+V/qt/9HCsIuIs8YdM/D/mbrCBrY/nsssYUvlJHDI7NuTa8CIAZgpNC NjNoeSQhCrql86A289pq7brIBhSJ+OGEx2WtwmtVG/gNA1d+Jxl7f7ZJY7HQVs4i mV2pszDDpQMeG5VUGOOKxS9vLS72rYMbEz+RbncIsj6yua6S90d+509b87T4J6HW /Wy+b3c7U44/Dja04VufXOVhR6ypQRXgqDazgBpFVZQiQFhCfTG64yhOH9thtec/ Aymge8qX4VMn2p/HgGHP5LhgY+dS9eRGsjOYbN7n9QuIcDnOychKynC7xpSJTNrw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtddugdeitdculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkpheple ekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 31FC7E4597; Mon, 18 Feb 2019 11:42:48 -0500 (EST) Date: Mon, 18 Feb 2019 08:42:47 -0800 From: Andres Freund To: Tom Lane Cc: Alvaro Herrera , m.kiianov@rtk-dc.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15640: FATAL: XX000: cannot read pg_class without having selected a database Message-ID: <20190218164247.5jvu7gotnz4sw4jn@alap3.anarazel.de> References: <20190218144555.GA4579@alvherre.pgsql> <28802.1550507389@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28802.1550507389@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-02-18 11:29:49 -0500, Tom Lane wrote: > Alvaro Herrera writes: > > On 2019-Feb-18, PG Bug reporting form wrote: > >> 2019-02-18 05:30:36 GMT [40378]: [2-1] db=,user= FATAL: XX000: cannot read pg_class without having selected a database > >> 2019-02-18 05:30:36 GMT [40378]: [3-1] db=,user= LOCATION: ScanPgRelation, relcache.c:314 > > > Hmm, I wonder if this is a bug introduced in 6a46aba1cd6d (in 9.6.10) > > that only hits autovacuum launcher after a relcache init removal at just > > the wrong time, or something like that? I don't immediately see how that'd be the culprit - we'd processed sinvals in some cases before that change too. I'm inclined to think Tom's guess is the right one, but ... My initial guess would be that one of the extensions registered a relcache callback, and does catalog accesses in an unconditional manner. > I think/hope that the launcher isn't connected to sinval, either. Hm, I don't think that's true? The launcher does InitPostgres() and everything (albeit without a database). And it needs to process relmapper updates, otherwise it can't access pg_database. And that's accessed via a normal heap_open(). Greetings, Andres Freund