Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0908E632954 for ; Fri, 11 Sep 2009 04:26:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 71332-08 for ; Fri, 11 Sep 2009 07:26:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mail.postgresql.org (Postfix) with ESMTP id 4798D6328BB for ; Fri, 11 Sep 2009 04:26:19 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPGYqUrUnw6T/2dsb2JhbADdM4QYBQ Received: from ptb-relay03.plus.net ([212.159.14.147]) by relay.pcl-ipout02.plus.net with ESMTP; 11 Sep 2009 08:26:18 +0100 Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay03.plus.net with esmtp (Exim) id 1Mm0WP-0004LY-Un; Fri, 11 Sep 2009 08:26:18 +0100 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id B24E127404C; Fri, 11 Sep 2009 08:26:17 +0100 (BST) Message-ID: <4AA9FB99.6090107@archonet.com> Date: Fri, 11 Sep 2009 08:26:17 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: jtayamai CC: pgsql-sql@postgresql.org Subject: Re: Encryption in the tables of a Postgres 7.3.2 database References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Plusnet-Relay: e294cc51efdc245c41ff819e7d99d8fa X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.181 tagged_above=-10 required=5 tests=AWL=0.419, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200909/46 X-Sequence-Number: 33111 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