From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Westermann <daniel(dot)westermann(at)dbi-services(dot)com> |
Cc: | Postgres General Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Deleting a table file does not raise an error when the table is touched afterwards, why? |
Date: | 2016-05-30 16:27:37 |
Message-ID: | 12309.1464625657@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Daniel Westermann <daniel(dot)westermann(at)dbi-services(dot)com> writes:
> Then I delete the file:
> postgres(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Ignatov | 2016-05-30 16:34:25 | Re: Deleting a table file does not raise an error when the table is touched afterwards, why? |
Previous Message | Simon Riggs | 2016-05-30 16:24:10 | Re: pglogical |