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 1jVmDg-0004gx-SX for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 01:18:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jVmDf-0007uM-IZ for pgsql-general@arkaria.postgresql.org; Tue, 05 May 2020 01:17:59 +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 1jVmDe-0007rM-Uy for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 01:17:59 +0000 Received: from resqmta-ch2-02v.sys.comcast.net ([2001:558:fe21:29:69:252:207:34]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jVmDZ-0006Md-Ji for pgsql-general@lists.postgresql.org; Tue, 05 May 2020 01:17:56 +0000 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-02v.sys.comcast.net with ESMTP id VlxujT56ZjoMlVmDUjXQ1N; Tue, 05 May 2020 01:17:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1588641468; bh=bQ+O4TKTj8F6Daot01lpDYbEO2O2d5RyRye8aC8d4D0=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=itgPKDKWWCFAelzKQXHXQmxSbb6WyDlSj0FKz68apohC6m2Z603+EgnSPYZh9Z/Th SaIC27vuoiFCgHyvbUy+lWT8vPn8LTdaJzAXV3vP1VlWck85d5OG5uQ+ui22sCm9b1 affIunqG48T+7Qf8lGvMTQRj2EM4zt7XsK0lJOQt3fra36E2xVSROQbn98OkJOBkW/ D6CCrPW5K+OPLWKaB0BcXItYYHqvsaPfxpn3smMmu4yNdrJbgpQRJPAZBYLWjCBj1K YJYi4WrUDxKRv9LPQPFeF+pmTQ2+3MC/D69++0XGLoGfei7f9kaH1hrISzCcuCKabk 4e9Qfa3m2d31A== Received: from jsievers.comcast.net ([12.187.116.132]) by resomta-ch2-03v.sys.comcast.net with ESMTPA id VmDFj1Ny6tcQpVmDGj3tAQ; Tue, 05 May 2020 01:17:40 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgeduhedrjeehgdegfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffjgfkfgggtgfgsehtqhertddtreejnecuhfhrohhmpeflvghrrhihucfuihgvvhgvrhhsuceoghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeevhfelgfeuudevudetvefgtdekheeggfehgeetheekkefhvdegvdehueehvdekveenucfkphepuddvrddukeejrdduudeirddufedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghlohepjhhsihgvvhgvrhhsrdgtohhmtggrshhtrdhnvghtpdhinhgvthepuddvrddukeejrdduudeirddufedvpdhmrghilhhfrhhomhepghhsihgvvhgvrhhsudelsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrhgrlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtoheprhhitghkhiesrhgvugguihhtrdgtohhm X-Xfinity-VMeta: sc=-100.00;st=legit Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id CBBCE26005A; Mon, 4 May 2020 20:17:32 -0500 (CDT) From: Jerry Sievers To: Ricky Ramirez Cc: pgsql-general@lists.postgresql.org Subject: Re: Temporary table has become problematically persistent References: Date: Mon, 04 May 2020 20:17:32 -0500 In-Reply-To: (Ricky Ramirez's message of "Mon, 4 May 2020 16:24:09 -0700") Message-ID: <87a72ngoyb.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ricky Ramirez writes: > Hello, > > 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=C2=A0ID 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! What happened when you tried to drop the temp table? > > The table shows up in pg_class as a temporary table with zero tuples. > The table replicated over to other hosts. We were able to promote a > replica and then single user mode the replica and drop the offending > table. I still have the original broken database available for > debugging. Can I provide any additional debugging information? > > Thanks, > > Ricky > > --=20 Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net