Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] switching production server from myswl to postgresql
Date: Wed, 21 Dec 2011 20:20:07
Message-Id: 4EF23F2A.9020309@gmail.com
In Reply to: [gentoo-user] switching production server from myswl to postgresql by Tanstaafl
1 Tanstaafl wrote:
2 > Hi all,
3 >
4 > Ok, this has been on my ToDo list for a while, and I'm thinking of
5 > tacking this over the holidays, since the office will be much slower
6 > than usual.
7 >
8 > The only databases I have in use are for my mail server, which means
9 > postfix, courier-imap (soon to be dovecot 2.1 once it is released) and
10 > postfixadmin for maintaining the database.
11 >
12 > First question - I can run both mysql and postgresql at the same time,
13 > right? I haven't found anything saying I can't, and mysql doesn't seem
14 > to 'block' installing postgresql, so I'm guessing I can.
15
16 Sure; they're different SQL engines. SQL isn't a standardized service
17 that you'd expect to find at a particular location or port.
18
19 They are, however, not entirely compatible. The SQL spec is
20 unfortunately vague, and even where it's relatively clear, popular
21 engines have idiosyncrasies that can result in application written for
22 one not quite working with another.
23
24 >
25 > Second question - has anyone ever converted an existing production mysql
26 > database to postgresql? If you have ever done this specifically for
27 > postfixadmin, I'd love to chat for a few minutes, but pointers to
28 > recent, accurate docs - even generically (not specifically for
29 > postfixadmin) for doing this would be appreciated.
30
31 This is going to almost entirely depend on the application you want to
32 switch from being backed by mysql to postgresql. I'm not even sure
33 'mysqldump' has an export mode that can be easily massaged to be an
34 import mode for postgresql.
35
36 That said, the #postgresql IRC channel on FreeNode is one of the nicest
37 IRC channel's I've interacted with.