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 1lHURZ-0001Wz-HW for pgsql-general@arkaria.postgresql.org; Wed, 03 Mar 2021 16:33:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lHURX-0000PX-Nm for pgsql-general@arkaria.postgresql.org; Wed, 03 Mar 2021 16:33:47 +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 1lHURX-0000PP-Fs for pgsql-general@lists.postgresql.org; Wed, 03 Mar 2021 16:33:47 +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 1lHURV-0008Cu-D8 for pgsql-general@lists.postgresql.org; Wed, 03 Mar 2021 16:33:47 +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 123GXfG71194519; Wed, 3 Mar 2021 11:33:41 -0500 From: Tom Lane To: Tobias Lott cc: Laurenz Albe , pgsql-general@lists.postgresql.org Subject: Re: permission denied for pg_temp_XX when vacuuming In-reply-to: References: <1180816.1614784546@sss.pgh.pa.us> <1182966.1614787828@sss.pgh.pa.us> Comments: In-reply-to Tobias Lott message dated "Wed, 03 Mar 2021 17:26:56 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1194517.1614789221.1@sss.pgh.pa.us> Date: Wed, 03 Mar 2021 11:33:41 -0500 Message-ID: <1194518.1614789221@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tobias Lott writes: > There were no crashes of the instance, but some issues with the connected > application, resulting in 'could not receive data from client: Connection > reset by peer' and 'unexpected EOF on client connection with an open > transaction'. No, that sort of thing would still allow the backend to shut down cleanly. > So if this might have left behind temp tables causing the errors, should I > try to delete these pg_temp tables? It would definitely be worth looking around to see if you have any temp tables that shouldn't be there. I think you can just do \dt pg_temp_*.* in psql (as superuser) to see what's out there. Figuring out which ones are live sessions' temp tables might be harder, though. regards, tom lane