Running Multiple Postmasters

From: "Clay Luther" <claycle(at)cisco(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Running Multiple Postmasters
Date: 2004-04-19 16:55:10
Message-ID: F67EB38120F7BB4BB972C78609580207018DC89A@ipcbu-exchange.amer.unity.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am wondering if it is possible, or even advisable, to run two
postmasters on a single system.

For example, we have an embedded system with a normal runtime partition
(called the "A") in which the PGDATA is /var/lib/pgsql/data. We also
have a offline partition which is a copy of the runtime partition, but
is mounted under /partB -- PGDATA here is /partB/var/lib/pgsql/data.

During upgrades, we will alter the installation on the B partition, then
swap the paritions after a reboot.

However, during upgrades, we may need to migrate data from the A
partition databases to the B partition databases.

For database migrations, I was hoping I could do the following
(remember, a postmaster is already running on /var/lib/pgsql/data):

1) Alter the the postgresql.conf of the B partition PGDATA, setting the
tcp/ip port to 54321.
2) Start the "B" postmaster, pg_ctl -D /partB/var/lib/pgsql/data start
3) Use ODBC/JDBC to perform necessary migration from A databases to B
databases.
4) pg_ctl -D /partB/var/lib/pgsql/data stop
5) Set B postgresql.conf tcp/ip port to 5432.
6) Reboot (higher level systems will automatically swap the A and B
partitions, so B becomes A and A becomes the new B).

Conceptually clear, but I wanted to know if there was anything I needed
to be worried about.

Thanks.

---
Clay
claycle(at)cisco(dot)com
(972) 813-5004

_____

I've stopped 272 spam messages. You can too!
One month FREE spam protection at www.cloudmark.com
<http://www.cloudmark.com/spamnet?v1>
<http://www.cloudmark.com/spamnet?v1>


Responses

Browse pgsql-general by date

  From Date Subject
Next Message Froggy / Froggy Corp. 2004-04-19 16:59:38 Using of GeQo
Previous Message Froggy / Froggy Corp. 2004-04-19 16:52:26 Postgresql 7.4.1 - Template database and user permission