Re: Deleting a table file does not raise an error when the table is touched afterwards, why?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Deleting a table file does not raise an error when the table is touched afterwards, why?
Дата
Msg-id 12309.1464625657@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Deleting a table file does not raise an error when the table is touched afterwards, why?  (Daniel Westermann <daniel.westermann@dbi-services.com>)
Список pgsql-general
Daniel Westermann <daniel.westermann@dbi-services.com> writes:
> Then I delete the file:
> postgres@pg_essentials_p1:/u02/pgdata/PG1/base/16422/ [PG1] rm 32809

There's a reason why the database directory is not readable/writable
by unprivileged users: it's to prevent them from doing dumb things
like that.  People who do have write access on the database are
assumed to know better.

> Wouldn't it be much more safe to raise an error as soon as the table is touched?

Well, yes, but it would impose huge amounts of overhead in order to
raise an error a bit sooner for a stupid user action.  The ideal
thing would be to prevent users from breaking their database in the
first place --- but there's not much we can do in that direction
beyond setting the directory permissions.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: pglogical
Следующее
От: Alex Ignatov
Дата:
Сообщение: Re: Deleting a table file does not raise an error when the table is touched afterwards, why?