Re: Quirk of pg_temp schemas ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quirk of pg_temp schemas ...
Date: 2021-08-10 15:30:35
Message-ID: 3787327.1628609435@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <stark(at)mit(dot)edu> writes:
> While fixing up a patch I had dealing with temporary tables I noticed
> a bit of a quirk with pg_temp schemas. Namely that we have no actual
> meta data marking them as temporary aside from their names. And we
> don't do anything to protect that -- superuser can happily issue ALTER
> SCHEMA RENAME to rename it to a name that doesn't match pg_temp*.

This seems to me to be not very different from the 1001 other ways that
a superuser can break a database. If *non* superusers could rename
those schemas then I'd agree there's a problem to be solved.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sadhuprasad Patro 2021-08-10 16:03:33 Re: Support reset of Shared objects statistics in "pg_stat_reset" function
Previous Message Tom Lane 2021-08-10 15:26:30 Re: [PATCH] test/ssl: rework the sslfiles Makefile target