public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: failure to drop table due to pg_temp_7 schema
Date: Sat, 15 Nov 2025 10:28:18 -0500
Message-ID: <CANzqJaD-J8kSsmvUC+9W5hix8WtKkvhr4UGDKggwheRusvVRtg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Sat, Nov 15, 2025 at 10:00 AM Peter 'PMc' Much <
[email protected]> wrote:
>
> Hi,
> trying to unload (and then reload) a development application,
> failed with this error:
>
> fin(dev)> Que.migrate! version: 0
> ERROR: cannot drop table que_jobs because other objects depend on it
> (PG::DependentObjectsStillExist)
> DETAIL: function pg_temp_7.lock_and_update_priorities(jsonb,que_jobs)
> depends on type que_jobs
> HINT: Use DROP ... CASCADE to drop the dependent objects too.
>
>
> The routine was trying to remove all database objects in the order
> they were formerly created,
In the *REVERSE* order they were created?
[snip]
> I would rather figure out what actually went wrong (and then probably
> fix it for the future).
>
> So I started to investigate. Enabling "System Objects" in pgadmin4,
> I find a vast amount of pg_temp_### schemas, and therein I actually
> find the offending object - it indeed contains some stuff the Que
> software would probably use.
>
> Then, trying to figure out how this is supposed to be cleaned up,
> I find this article by subject matter expert Laurenz Albe:
> https://stackoverflow.com/a/79693897
>
> Temporary tables are automatically removed when the database
> session terminates. Consequently, your users are running long
> database sessions.
>
> Sadly, this does not make much sense to me, because there are
> (currently) no sessions on the database (checked with 'ps ax').
>
Abnormal session termination is the typical reason for them to hang around.
--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: failure to drop table due to pg_temp_7 schema
In-Reply-To: <CANzqJaD-J8kSsmvUC+9W5hix8WtKkvhr4UGDKggwheRusvVRtg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox