change location of postmaster.pid file?

From: Janet Jacobsen <jsjacobsen(at)lbl(dot)gov>
To: pgsql-general(at)postgresql(dot)org
Cc: jsjacobsen(at)lbl(dot)gov
Subject: change location of postmaster.pid file?
Date: 2009-07-10 22:17:57
Message-ID: 4A57BE15.70509@lbl.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. We are looking into the possibility of running a Postgres
server on an underutilized machine. This machine has very
little local disk space, so we would have to create the data
directory on a shared file system.

The underutilized machine was set up so that it can *only
read* from the shared file system, i.e., cannot write to the
shared file system.

Is it possible to create a database cluster on a machine that
has write access to the shared file system, shut down the
Postgres server on that machine, and then start up the
Postgres server on the machine that cannot write to the
shared file system, and thereafter, *only query* the database.

Since Postgres writes the postmaster.pid file to the data
directory (which would be on the shared file system), the
answer would appear to be no, since the 'underutilized'
machine cannot write any files to the shared file system.

Would it be possible to write the postmaster.pid file to the
local file system on the 'underutilized' machine even though
the data directory is on the shared file system?

I realize that this seems like a bad idea - given that the
purpose of the postmaster.pid file as I understand it is to
prevent more than one postmaster running in a data
directory - but I wanted to ask whether this is a possibility.

Even if it were possible to write the postmaster.pid to the
local file system on the 'underutilized' machine, does Postgres
write other temporary files even if only SELECT statements
are being executed against the database? And where does it
write those files - in subdirectories of the data directory?

Thank you,
Janet

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-07-10 22:34:14 Re: Idle in transaction help
Previous Message Alvaro Herrera 2009-07-10 22:13:30 Re: BR/