Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I'm working on a 2-node High Availability PostgreSQL database cluster for my company. The system has a master/standby setup where the standby takes over the duties of the master when the master fails and both have up-to-date data.

Here is a previous question which describes the exact scenario I am trying to find a solution for: PostgreSQL Failover - What tools should I use?

Every solution has an overhead of replicating the database between the master and the standby server. However, if I can share the same data location between both the servers, this need for replication will be removed.

I'm thinking of using a highly reliable SAS Storage shared between both the servers for PostgreSQL data. As only one instance of PostgreSQL will be running at a given time (using pacemaker failover) this should work, atleast in paper.

My Experiment:

  • I identified two free workstations at our test lab, Workstation-A and Workstation-B for the sake of discussion here.

  • I stopped the PostgreSQL 9.1 process on Workstation-A and Workstation-B

  • I shared over NFS /var/lib/postgresql and /var/log/postgresql folders of Workstation-A

  • I mounted the above directories at the same locations in Workstation-B

  • I ran

    /etc/init.d/postgresql start
  • I got the following error:

    IST FATAL:  could not access private key file "server.key": Permission denied

Any idea how to fix this issue ?

I need this working as a proof-of-concept that can be evaluated for the project.

share|improve this question
up vote 1 down vote accepted

I figured out the issue. It was due to improperly shared NAS folder. I fixed it by using this entry in /etc/exports


to share.

And if it interests anybody, I managed to get shared database running successfully. The only folder that needed to be common was the above folder. And both PostgreSQL Server instances need to have identical configuration files for the data folder to be shared successfully.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.