change location of postmaster.pid file? - Mailing list pgsql-general

From Janet Jacobsen
Subject change location of postmaster.pid file?
Date
Msg-id 4A57BE15.70509@lbl.gov
Whole thread Raw
Responses Re: change location of postmaster.pid file?
Re: change location of postmaster.pid file?
List 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

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BR/
Next
From: Scott Marlowe
Date:
Subject: Re: Idle in transaction help