Обсуждение: Encryption in the tables of a Postgres 7.3.2 database

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

Encryption in the tables of a Postgres 7.3.2 database

От
jtayamai
Дата:
Hi,

I've a Postgres DB release 7.3.2 and some developed C++ and PHP code
so as to communicate with it.

Currently, the data I've in the different tables is stored with no
encription at all, and I was wondering if there would be an easy way
to get it encrypted without major changes in the already developed C++/
PHP code.

I mean, I want to replace the non-encrypted database with an encrypted
version of it without C++/PHP programmes noticing it.

Has anyone any suggestion about the easiest way to do it?

Thanks.


Re: Encryption in the tables of a Postgres 7.3.2 database

От
Richard Huxton
Дата:
jtayamai wrote:
> Hi,
> 
> I've a Postgres DB release 7.3.2 and some developed C++ and PHP code
> so as to communicate with it.

Most important thing: upgrade this version of PostgreSQL. You can't even
get 7.3 from the main site any more, so you'll have to look on
ftp://ftp-archives.postgresql.org/

The last release was 7.3.21 - work through the release notes and then
download as soon as possible.

> Currently, the data I've in the different tables is stored with no
> encription at all, and I was wondering if there would be an easy way
> to get it encrypted without major changes in the already developed C++/
> PHP code.
> 
> I mean, I want to replace the non-encrypted database with an encrypted
> version of it without C++/PHP programmes noticing it.
> 
> Has anyone any suggestion about the easiest way to do it?

Well, you don't want to be making any changes to a PostgreSQL version
that old - it will be impossible to find anyone to help with it. I'd
suggest encrypting a filesystem and putting your database on that. That
will impact performance of course.

If you only want to encrypt a few tables, you could look at splitting
where the files are stored. That might involve setting up symlinks, I
can't remember if 7.3 supported tablespaces.

If you do put some files on the encrypted filesystem and some on the
unencrypted one make sure you don't start PG until both are available. I
don't know what would happen if one wasn't but it's unlikely to be fun.

--  Richard Huxton Archonet Ltd