pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Creating Multiple Instance
4+ messages / 4 participants
[nested] [flat]

* Creating Multiple Instance
@ 2011-12-13 08:23 Selva manickaraja <mavles78@gmail.com>
  2011-12-13 11:44 ` Re: Creating Multiple Instance Thomas Markus <t.markus@proventis.net>
  2011-12-13 16:12 ` Re: Creating Multiple Instance Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Selva manickaraja @ 2011-12-13 08:23 UTC (permalink / raw)
  To: pgsql-admin

Hi All,

We are planning to create a 2nd instance of postgres db in the same server.
The reason is simple. After we added another application, the number of
WAL(s) created is too much. So we want to separate the db by moving it out
to another instance of postgres in the same machine. We want to study that
new application the new db independently to understand what could go wrong.
Meanwhile we want the operations and backups on our existing db running on
5432 port to be going on as usual.

Steps we took:

1.Create a new cluster "/pgs/903/data_5433"
2. Start the db instance using new parameters i.e. - (su - postgres -c
"/opt/pgs/903/bin/pg_ctl -w start -D \"/pgs/903/data_5433\" -l
\"/pgs/903/data_5433/pg_log/startup.log\"")

Unfortunately we got the following error.

pg_ctl: another server might be running; trying to start server anyway
waiting for server to start... done
server started

First of all, we want to know if at all it is possible to do this in
PostgreSQL, or whether we missed out any important steps.

Please help.

Thank you.

Regards,

Selvam

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Creating Multiple Instance
  2011-12-13 08:23 Creating Multiple Instance Selva manickaraja <mavles78@gmail.com>
@ 2011-12-13 11:44 ` Thomas Markus <t.markus@proventis.net>
  2011-12-13 15:32   ` Re: Creating Multiple Instance Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 4+ messages in thread

From: Thomas Markus @ 2011-12-13 11:44 UTC (permalink / raw)
  To: pgsql-admin

Hi,

thats possible. Dont forget so set another port in your postgresql.conf

Thomas

Am 13.12.2011 09:23, schrieb Selva manickaraja:
> Hi All,
>
> We are planning to create a 2nd instance of postgres db in the same 
> server. The reason is simple. After we added another application, the 
> number of WAL(s) created is too much. So we want to separate the db by 
> moving it out to another instance of postgres in the same machine. We 
> want to study that new application the new db independently to 
> understand what could go wrong. Meanwhile we want the operations and 
> backups on our existing db running on 5432 port to be going on as usual.
>
> Steps we took:
>
> 1.Create a new cluster "/pgs/903/data_5433"
> 2. Start the db instance using new parameters i.e. - (su - postgres -c 
> "/opt/pgs/903/bin/pg_ctl -w start -D \"/pgs/903/data_5433\" -l 
> \"/pgs/903/data_5433/pg_log/startup.log\"")
>
> Unfortunately we got the following error.
>
> pg_ctl: another server might be running; trying to start server anyway
> waiting for server to start... done
> server started
>
> First of all, we want to know if at all it is possible to do this in 
> PostgreSQL, or whether we missed out any important steps.
>
> Please help.
>
> Thank you.
>
> Regards,
>
> Selvam
>
>




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Creating Multiple Instance
  2011-12-13 08:23 Creating Multiple Instance Selva manickaraja <mavles78@gmail.com>
  2011-12-13 11:44 ` Re: Creating Multiple Instance Thomas Markus <t.markus@proventis.net>
@ 2011-12-13 15:32   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2011-12-13 15:32 UTC (permalink / raw)
  To: Thomas Markus <t.markus@proventis.net>; +Cc: pgsql-admin@postgresql.org, Selva manickaraja <mavles78@gmail.com>

Thomas Markus <t.markus@proventis.net> writes:
> thats possible. Dont forget so set another port in your postgresql.conf

I think actually the reason pg_ctl is complaining is that it doesn't
know how to read postgresql.conf, so it's unaware that the second server
is supposed to be on 5433.  (IIRC, this is fixed in 9.1, but not 9.0.)
It is starting the postmaster correctly, but the -w switch likely
doesn't work as expected.

What I'd suggest is setting the nondefault port number both in
postgresql.conf and on the server command line --- ie, if you're using
pg_ctl, include -o '-p 6433' in its arguments.  That tells pg_ctl what's
going on, and it has another benefit that you'll soon recognize: you'll
be able to tell which postmaster is which in ps listings.  The
postgresql.conf entry is then redundant, but a good thing to have as a
backstop in case you forget the command line switch one day.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Creating Multiple Instance
  2011-12-13 08:23 Creating Multiple Instance Selva manickaraja <mavles78@gmail.com>
@ 2011-12-13 16:12 ` Scott Marlowe <scott.marlowe@gmail.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Scott Marlowe @ 2011-12-13 16:12 UTC (permalink / raw)
  To: Selva manickaraja <mavles78@gmail.com>; +Cc: pgsql-admin

On Tue, Dec 13, 2011 at 1:23 AM, Selva manickaraja <mavles78@gmail.com> wrote:
> Hi All,
>
> We are planning to create a 2nd instance of postgres db in the same server.
> The reason is simple. After we added another application, the number of

You don't mention which OS you're running, but any debian based Linux
distro can do this rather easily with pg_createcluster.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-12-13 16:12 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-12-13 08:23 Creating Multiple Instance Selva manickaraja <mavles78@gmail.com>
2011-12-13 11:44 ` Thomas Markus <t.markus@proventis.net>
2011-12-13 15:32   ` Tom Lane <tgl@sss.pgh.pa.us>
2011-12-13 16:12 ` Scott Marlowe <scott.marlowe@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox