Re: Autovaccuum vs temp tables crash

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Autovaccuum vs temp tables crash
Date: 2019-02-23 13:48:58
Message-ID: CABUevExrtZ1H0qyMLqTxYYPOa1atjCqxc4NzXbMOVUGYkMq6DA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 22, 2019 at 7:15 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Fri, Feb 22, 2019 at 1:14 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Why? It would likely be a significant amount of effort and added
> overhead,
> > to accomplish no obviously-useful goal.
> >
> > Note that all the temp schemas are made as owned by the bootstrap
> > superuser, so there is no real argument to be made that people might
> > be expecting they should be able to delete them.
>
> Hmm, well maybe you're right. Just seems like an odd wart.
>

Well, the way it works now is you can drop them. But if you then create
another temp table in the same session, it will get an oid of the already
dropped schema in the relnamespace column.

That just seems plain broken.

I think we need to either prevent dropping of temp namespaces *or* we need
to create a new entry in pg_namespace in this particular case.

I wonder if other "fun" things could happen if you go rename the namespace,
haven't tried that yet...

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2019-02-23 14:06:42 Re: oddity with ALTER ROLE/USER
Previous Message Haribabu Kommi 2019-02-23 13:28:27 Re: [HACKERS] Block level parallel vacuum