Обсуждение: BUG #17106: Renaming system types is possible and it potentially leads to a crash

Поиск
Список
Период
Сортировка

BUG #17106: Renaming system types is possible and it potentially leads to a crash

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      17106
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 13.3
Operating system:   Ubuntu 20.04
Description:

While dropping system types is prohibited (say, you can't DROP TYPE void),
renaming is not. So the following commands lead to an inevitable crash.
ALTER TYPE void RENAME TO void_void;
CREATE TABLE void(id int);
CREATE EXTENSION pg_stat_statements;
SELECT pg_stat_statements_reset();

(Superuser rights required for this, though.)


Re: BUG #17106: Renaming system types is possible and it potentially leads to a crash

От
Michael Paquier
Дата:
On Thu, Jul 15, 2021 at 04:00:01AM +0000, PG Bug reporting form wrote:
> While dropping system types is prohibited (say, you can't DROP TYPE void),
> renaming is not. So the following commands lead to an inevitable crash.
> ALTER TYPE void RENAME TO void_void;
> CREATE TABLE void(id int);
> CREATE EXTENSION pg_stat_statements;
> SELECT pg_stat_statements_reset();
>
> (Superuser rights required for this, though.)

Like one of those many stupid things one can do as a superuser :)

This does not seem worth worrying about to me.
--
Michael

Вложения

Re: BUG #17106: Renaming system types is possible and it potentially leads to a crash

От
Francisco Olarte
Дата:
On Thu, Jul 15, 2021 at 9:21 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
...
> While dropping system types is prohibited (say, you can't DROP TYPE void),
> renaming is not. So the following commands lead to an inevitable crash.
... example removed.
> (Superuser rights required for this, though.)

Any competent programmer can crash a machine, any competent DBA can
crash a DB, anyone with physical access can unplug a server, or set it
on fire.

Given it is not an easy mistake to make ( "DROP type void" is way more
dangerous, being so simple ), I would consider this anecdotal. I doubt
"survive an hostile DBA" is an objective for postgresql.

Francisco Olarte.