Re: Autovaccuum vs temp tables crash - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Autovaccuum vs temp tables crash
Date
Msg-id CABUevExrtZ1H0qyMLqTxYYPOa1atjCqxc4NzXbMOVUGYkMq6DA@mail.gmail.com
Whole thread Raw
In response to Re: Autovaccuum vs temp tables crash  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Autovaccuum vs temp tables crash
Re: Autovaccuum vs temp tables crash
List pgsql-hackers


On Fri, Feb 22, 2019 at 7:15 PM Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Feb 22, 2019 at 1:14 PM Tom Lane <tgl@sss.pgh.pa.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...
 
--

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Block level parallel vacuum
Next
From: Stephen Frost
Date:
Subject: Re: oddity with ALTER ROLE/USER