From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: how to securely delete the storage freed when a table is dropped?
Date: Fri, 13 Apr 2018 14:03:10 -0500
Message-ID: <81f77dea-32bf-a5d7-5a9c-c70a42b4f155@gmail.com> (raw)
In-Reply-To: <CAK5U2OK5Ox_XVo_Gf2WKSSMVDYBy6j7wYW3YY00bS7syxeAXJw@mail.gmail.com>
References: <CAK5U2OK5Ox_XVo_Gf2WKSSMVDYBy6j7wYW3YY00bS7syxeAXJw@mail.gmail.com>
On 04/13/2018 12:48 PM, Jonathan Morgan wrote:
> For a system with information stored in a PostgreSQL 9.5 database, in
> which data stored in a table that is deleted must be securely deleted
> (like shred does to files), and where the system is persistent even though
> any particular table likely won't be (so can't just shred the disks at
> "completion"), I'm trying to figure out my options for securely deleting
> the underlying data files when a table is dropped.
>
> As background, I'm not a DBA, but I am an experienced implementor in many
> languages, contexts, and databases. I've looked online and haven't been
> able to find a way to ask PostgreSQL to do the equivalent of shredding its
> underlying files before releasing them to the OS when a table is DROPped.
> Is there a built-in way to ask PostgreSQL to do this? (I might just not
> have searched for the right thing - my apologies if I missed something)
>
> A partial answer we're looking at is shredding the underlying data files
> for a given relation and its indexes manually before dropping the tables,
> but this isn't so elegant, and I'm not sure it is getting all the
> information from the tables that we need to delete.
>
> We also are looking at strategies for shredding free space on our data
> disk - either running a utility to do that, or periodically replicating
> the data volume, swapping in the results of the copy, then shredding the
> entire volume that was the source so its "free" space is securely
> overwritten in the process.
>
> Are we missing something? Are there other options we haven't found? If we
> have to clean up manually, are there other places we need to go to shred
> data than the relation files for a given table, and all its related
> indexes, in the database's folder? Any help or advice will be greatly
> appreciated.
I'd write a program that fills all free space on disk with a specific
pattern. You're probably using a logging filesystem, so that'll be far from
perfect, though.
--
Angular momentum makes the world go 'round.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ronljohnsonjr@gmail.com
Subject: Re: how to securely delete the storage freed when a table is dropped?
In-Reply-To: <81f77dea-32bf-a5d7-5a9c-c70a42b4f155@gmail.com>
References: <CAK5U2OK5Ox_XVo_Gf2WKSSMVDYBy6j7wYW3YY00bS7syxeAXJw@mail.gmail.com> <81f77dea-32bf-a5d7-5a9c-c70a42b4f155@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox