Re: Complete data erasure - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Complete data erasure
Date
Msg-id 9104.1579107235@sss.pgh.pa.us
Whole thread Raw
In response to Re: Complete data erasure  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: Complete data erasure  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> But let's assume it makes sense - is this really the right solution? I
> think what I'd prefer is encryption + rotation of the keys. Which should
> work properly even on COW filesystems, the performance impact is kinda
> low and amortized etc. Of course, we're discussing built-in encryption
> for quite a bit of time.

Yeah, it seems to me that encrypted storage would solve strictly more
cases than this proposal does, and it has fewer foot-guns.

One foot-gun that had been vaguely bothering me yesterday, but the point
didn't quite crystallize till just now, is that the only place that we
could implement such file zeroing is post-commit in a transaction that
has done DROP TABLE or TRUNCATE.  Of course post-commit is an absolutely
horrid place to be doing anything that could fail, since there's no very
good way to recover from an error.  It's an even worse place to be doing
anything that could take a long time --- if the user loses patience and
kills the session, now your problems are multiplied.

Right now our risks in that area are confined to leaking files if
unlink() fails, which isn't great but it isn't catastrophic either.
With this proposal, erroring out post-commit becomes a security
failure, if it happens anywhere before we've finished a possibly
large amount of zero-writing.  I don't want to go there.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgindent && weirdness
Next
From: Stephen Frost
Date:
Subject: Re: Complete data erasure