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 1mPmHs-0004ON-Or for pgsql-admin@arkaria.postgresql.org; Mon, 13 Sep 2021 13:46:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mPmHr-0005tS-MQ for pgsql-admin@arkaria.postgresql.org; Mon, 13 Sep 2021 13:46:19 +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 1mPmHr-0005tK-DO for pgsql-admin@lists.postgresql.org; Mon, 13 Sep 2021 13:46:19 +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 1mPmHp-0003eC-D7 for pgsql-admin@lists.postgresql.org; Mon, 13 Sep 2021 13:46: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 18DDkEOF358011; Mon, 13 Sep 2021 09:46:14 -0400 From: Tom Lane To: liam saffioti cc: Avinash Vallarapu , pgsql-admin Subject: Re: autoovacuum launcher process In-reply-to: References: <214794.1631455943@sss.pgh.pa.us> Comments: In-reply-to liam saffioti message dated "Mon, 13 Sep 2021 16:30:16 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <358009.1631540774.1@sss.pgh.pa.us> Date: Mon, 13 Sep 2021 09:46:14 -0400 Message-ID: <358010.1631540774@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk liam saffioti writes: > Do you think timescaledb is causing this problem? Seems possible. > 2021-09-10 01:00:32.691 156668 FATAL: cannot read pg_class without > having selected a database > 2021-09-10 01:00:33.356 110257 LOG: autovacuum launcher process (PID > 156668) exited with exit code 1 This is pretty clear evidence that some code running inside the autovacuum launcher process tried to read a non-shared catalog, which it cannot do because the launcher isn't connected to any specific database within the cluster. It is highly unlikely that anything in core Postgres is doing that; we'd have noticed. So I conclude that some extension code is carelessly trying to do catalog accesses without checking to see if it's running in a background process that doesn't support that. Of the extensions you listed, timescaledb is perhaps the most likely to contain such a bug; but I don't know much about hypopg, pg_partman, pg_stat_kcache, or powa, so I can't completely rule those out. It would have to be an extension that sometimes acts of its own accord without being called by a SQL command, so the list of suspects isn't all that long. Anyway, your first step should be to make sure you have up-to-date versions of all those extensions. If you do, then try filing a bug with timescaledb. regards, tom lane