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 1jVkuo-0008A4-Sy for pgsql-general@arkaria.postgresql.org; Mon, 04 May 2020 23:54:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVkum-0003Yv-QW for pgsql-general@arkaria.postgresql.org; Mon, 04 May 2020 23:54:24 +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 1jVkum-0003Vc-In for pgsql-general@lists.postgresql.org; Mon, 04 May 2020 23:54:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVkui-0005gZ-W9 for pgsql-general@lists.postgresql.org; Mon, 04 May 2020 23:54:23 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 044NsISl007821; Mon, 4 May 2020 19:54:18 -0400 From: Tom Lane To: Ricky Ramirez cc: pgsql-general@lists.postgresql.org Subject: Re: Temporary table has become problematically persistent In-reply-to: References: Comments: In-reply-to Ricky Ramirez message dated "Mon, 04 May 2020 16:24:09 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7819.1588636458.1@sss.pgh.pa.us> Date: Mon, 04 May 2020 19:54:18 -0400 Message-ID: <7820.1588636458@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ricky Ramirez writes: > We have run into a strange situation with our database. A temporary table > was created some time ago and that session has since died. However, the > temporary table stuck around. It's been around long enough that postgres > stopped accepting writes to prevent transaction ID wraparound. Problem is, > it's a temporary table and the session that it's associated with is gone, > so we cannot vacuum it nor even drop the table. We even restarted postgres > and the temporary table was still there! Hm, what PG version is this? I thought we'd fixed that hazard quite some while back. regards, tom lane