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 1lHTEJ-0006zI-2G for pgsql-general@arkaria.postgresql.org; Wed, 03 Mar 2021 15:16:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHTEG-0004vm-UQ for pgsql-general@arkaria.postgresql.org; Wed, 03 Mar 2021 15:16:00 +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 1lHTEG-0004vc-Ms for pgsql-general@lists.postgresql.org; Wed, 03 Mar 2021 15:16:00 +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 1lHTEA-0007F7-DK for pgsql-general@lists.postgresql.org; Wed, 03 Mar 2021 15:16:00 +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 123FFk7w1180817; Wed, 3 Mar 2021 10:15:47 -0500 From: Tom Lane To: Laurenz Albe cc: Tobias Lott , pgsql-general@lists.postgresql.org Subject: Re: permission denied for pg_temp_XX when vacuuming In-reply-to: References: Comments: In-reply-to Laurenz Albe message dated "Wed, 03 Mar 2021 12:10:26 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1180815.1614784546.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Mar 2021 10:15:46 -0500 Message-ID: <1180816.1614784546@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Laurenz Albe writes: > On Wed, 2021-03-03 at 09:58 +0100, Tobias Lott wrote: >> I have a database in a PostgreSQL 12 instance. >> When running vacuumdb -z on the database with the user set as owner of = the DB, I sometimes, not always, get errors such as: >> error: vacuuming of table "pg_temp_93.vacuum_l" in database "10050" fai= led: ERROR: permission denied for schema pg_temp_93 >> The specific number of the pg_temp schema (pg_temp_XX) is always changi= ng. What could be the reason for this error? > Those are schemas for temporary tables, which you cannot VACUUM outside = the > session that created them, so you can safely ignore these errors. Indeed, but I'm wondering why vacuumdb isn't skipping them automatically. Something fishy seems to be happening there. regards, tom lane