On 07/11/2012 08:58 PM, martin soethof wrote:
Hello
I have the following situation.
I used a postgres installer that can choose seperate paths for the
normal postgres and the data folder.
I used this because i wanted to share a database on an external hard
drive between 2 computers.
It'll work so long as both computers are running the same PostgreSQL
major version (same x.y version) built with the same options and the
same bitness (32- or 64-bit). I'd use replication instead if possible,
but it should work so long as the HDD isn't connected to and mounted by
both computers at the same time. If you're using USB that's impossible
and you'll be fine, but it's something to watch out for using FireWire
or SCSI/SAS.
The main thing is that you won't be able to use it as an auto-starting
Windows service. You must either start and stop the service manually
when the disk is added/removed, or use pg_ctl to start/stop the DB manually.
You will also have to watch out for permissions.
Personally, I'd use pg_ctl to start/stop the DB manually. See the
PostgreSQL documentation. That way you don't have to wrangle the Windows
service at all.
Tomorrow i will be sitting behind PC #2, how should i install it..
Check the command lines for the EnterpriseDB installer. I'd be surprised
if it didn't have a binaries-only option that allowed you to skip
database creation and creation of a Windows service entry, so you can
then just use pg_ctl to start/stop the DB.
--
Craig Ringer