From: Jerry Sievers <gsievers19@comcast.net>
To: Ricky Ramirez <ricky@reddit.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Temporary table has become problematically persistent
Date: Mon, 04 May 2020 20:17:32 -0500
Message-ID: <87a72ngoyb.fsf@jsievers.enova.com> (raw)
In-Reply-To: <CAFbL3BrRcPAbZXMrMojTCgitz5RZQLTP0D3vU+kOFPyvzPugrA@mail.gmail.com>
References: <CAFbL3BrRcPAbZXMrMojTCgitz5RZQLTP0D3vU+kOFPyvzPugrA@mail.gmail.com>
Ricky Ramirez <ricky@reddit.com> 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 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!
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
>
>
--
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: gsievers19@comcast.net, ricky@reddit.com
Subject: Re: Temporary table has become problematically persistent
In-Reply-To: <87a72ngoyb.fsf@jsievers.enova.com>
References: <CAFbL3BrRcPAbZXMrMojTCgitz5RZQLTP0D3vU+kOFPyvzPugrA@mail.gmail.com> <87a72ngoyb.fsf@jsievers.enova.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox