pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPG server clustering
5+ messages / 4 participants
[nested] [flat]
* PG server clustering
@ 2013-10-17 19:32 Joseph Mays <mays@win.net>
0 siblings, 1 reply; 5+ messages in thread
From: Joseph Mays @ 2013-10-17 19:32 UTC (permalink / raw)
To: pgsql-admin
We are assisting in the system administration of a partner that uses PostGres in a mission critical position in their system. They have mail servers and other things that rely on 24/7 availability for the postgres server. They are running postgres 9.04 on redhat linux (2.6.32-131.0.15.el6.x86_64). This is running on one old machine, and thus does not really provide the liability they looking for.
I had the thought that I could set up another server as a slave, then promote the slave in the event it’s necessary. I was trying I made a system that watches for a change in the IP number number of the server in dns, then downs the primary, swaps primary-secondary configs in the primary, restarts the primary, then does the same in the secondary. This actually worked on the first test from failing the primary to the secondary. The problem came when I stried to switch it back. When I tried to restart the original primary as secondary, it failed saying the database was corrupted.
There are a couple of possible solutions to this, but I’m starting to think that what they probably really want anyway is a Postgres server cluster of two servers that stay in synch with each other, and can simultaneously accept read and write requests. Are there any opinions here about the best way to set this up?
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PG server clustering
@ 2013-10-17 20:23 Joshua D. Drake <jd@commandprompt.com>
parent: Joseph Mays <mays@win.net>
0 siblings, 1 reply; 5+ messages in thread
From: Joshua D. Drake @ 2013-10-17 20:23 UTC (permalink / raw)
To: Joseph Mays <mays@win.net>; pgsql-admin
On 10/17/2013 12:32 PM, Joseph Mays wrote:
> We are assisting in the system administration of a partner that uses
> PostGres in a mission critical position in their system. They have mail
> servers and other things that rely on 24/7 availability for the postgres
> server. They are running postgres 9.04 on redhat linux
> (2.6.32-131.0.15.el6.x86_64). This is running on one old machine, and
> thus does not really provide the liability they looking for.
> I had the thought that I could set up another server as a slave, then
> promote the slave in the event it’s necessary. I was trying I made a
> system that watches for a change in the IP number number of the server
> in dns, then downs the primary, swaps primary-secondary configs in the
> primary, restarts the primary, then does the same in the secondary. This
> actually worked on the first test from failing the primary to the
> secondary. The problem came when I stried to switch it back. When I
> tried to restart the original primary as secondary, it failed saying the
> database was corrupted.
This is completely possible if configured correctly, we do this all the
time for customers.
> There are a couple of possible solutions to this, but I’m starting to
> think that what they probably really want anyway is a Postgres server
> cluster of two servers that stay in synch with each other, and can
> simultaneously accept read and write requests. Are there any opinions
> here about the best way to set this up?
There is no "good" way to do this. There are some application specific
ways but it depends on their needs.
Joshua D. Drake
--
Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
For my dreams of your image that blossoms
a rose in the deeps of my heart. - W.B. Yeats
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PG server clustering
@ 2013-10-17 20:30 Payal Singh <payal@omniti.com>
parent: Joshua D. Drake <jd@commandprompt.com>
0 siblings, 1 reply; 5+ messages in thread
From: Payal Singh @ 2013-10-17 20:30 UTC (permalink / raw)
To: Joshua D. Drake <jd@commandprompt.com>; +Cc: Joseph Mays <mays@win.net>; pgsql-admin
Hey,
You can have a look at Mimeo (https://github.com/omniti-labs/mimeo) which
is a specialized replication tool, through which you can have two servers
that are constantly in sync with each other and both can accept read and
write requests.
Mimeo does its replication on a per-table basis, and so you will have to
set up replication for each table, wherein you have various types of
replication mechanisms you can choose from. All this is pretty well
explained in the docs.
Payal Singh,
OmniTi Computer Consulting Inc.
Junior Database Architect,
Phone: 240.646.0770 x 253
On Thu, Oct 17, 2013 at 4:23 PM, Joshua D. Drake <jd@commandprompt.com>wrote:
>
> On 10/17/2013 12:32 PM, Joseph Mays wrote:
>
>> We are assisting in the system administration of a partner that uses
>> PostGres in a mission critical position in their system. They have mail
>> servers and other things that rely on 24/7 availability for the postgres
>> server. They are running postgres 9.04 on redhat linux
>> (2.6.32-131.0.15.el6.x86_64). This is running on one old machine, and
>> thus does not really provide the liability they looking for.
>> I had the thought that I could set up another server as a slave, then
>> promote the slave in the event it’s necessary. I was trying I made a
>> system that watches for a change in the IP number number of the server
>> in dns, then downs the primary, swaps primary-secondary configs in the
>> primary, restarts the primary, then does the same in the secondary. This
>> actually worked on the first test from failing the primary to the
>> secondary. The problem came when I stried to switch it back. When I
>> tried to restart the original primary as secondary, it failed saying the
>> database was corrupted.
>>
>
> This is completely possible if configured correctly, we do this all the
> time for customers.
>
>
> There are a couple of possible solutions to this, but I’m starting to
>> think that what they probably really want anyway is a Postgres server
>> cluster of two servers that stay in synch with each other, and can
>> simultaneously accept read and write requests. Are there any opinions
>> here about the best way to set this up?
>>
>
> There is no "good" way to do this. There are some application specific
> ways but it depends on their needs.
>
> Joshua D. Drake
>
>
> --
> Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
> PostgreSQL Support, Training, Professional Services and Development
> High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
> For my dreams of your image that blossoms
> a rose in the deeps of my heart. - W.B. Yeats
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-admin<http://www.postgresql.org/mailpref/pgsql-admin;
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PG server clustering
@ 2013-10-17 20:51 Payal Singh <payal@omniti.com>
parent: Payal Singh <payal@omniti.com>
0 siblings, 1 reply; 5+ messages in thread
From: Payal Singh @ 2013-10-17 20:51 UTC (permalink / raw)
To: Joseph Mays <mays@win.net>; pgsql-admin
Looks like you should check out the following instead, which are better
suited to your needs of a multi-master replication system :
http://postgres-r.org/
http://bucardo.org/
Payal Singh,
OmniTi Computer Consulting Inc.
Junior Database Architect,
Phone: 240.646.0770 x 253
On Thu, Oct 17, 2013 at 4:49 PM, Joseph Mays <mays@win.net> wrote:
> Thanks! I’ll check it out.
>
> *From:* Payal Singh <payal@omniti.com>
> *Sent:* Thursday, October 17, 2013 4:30 PM
> *To:* Joshua D. Drake <jd@commandprompt.com>
> *Cc:* Joseph Mays <mays@win.net> ; pgsql-admin@postgresql.org
> *Subject:* Re: [ADMIN] PG server clustering
>
> Hey,
>
> You can have a look at Mimeo (https://github.com/omniti-labs/mimeo) which
> is a specialized replication tool, through which you can have two servers
> that are constantly in sync with each other and both can accept read and
> write requests.
>
> Mimeo does its replication on a per-table basis, and so you will have to
> set up replication for each table, wherein you have various types of
> replication mechanisms you can choose from. All this is pretty well
> explained in the docs.
>
> Payal Singh,
> OmniTi Computer Consulting Inc.
> Junior Database Architect,
> Phone: 240.646.0770 x 253
>
>
> On Thu, Oct 17, 2013 at 4:23 PM, Joshua D. Drake <jd@commandprompt.com>wrote:
>
>>
>> On 10/17/2013 12:32 PM, Joseph Mays wrote:
>>
>>> We are assisting in the system administration of a partner that uses
>>> PostGres in a mission critical position in their system. They have mail
>>> servers and other things that rely on 24/7 availability for the postgres
>>> server. They are running postgres 9.04 on redhat linux
>>> (2.6.32-131.0.15.el6.x86_64). This is running on one old machine, and
>>> thus does not really provide the liability they looking for.
>>> I had the thought that I could set up another server as a slave, then
>>> promote the slave in the event it’s necessary. I was trying I made a
>>> system that watches for a change in the IP number number of the server
>>> in dns, then downs the primary, swaps primary-secondary configs in the
>>> primary, restarts the primary, then does the same in the secondary. This
>>> actually worked on the first test from failing the primary to the
>>> secondary. The problem came when I stried to switch it back. When I
>>> tried to restart the original primary as secondary, it failed saying the
>>> database was corrupted.
>>>
>>
>> This is completely possible if configured correctly, we do this all the
>> time for customers.
>>
>>
>> There are a couple of possible solutions to this, but I’m starting to
>>> think that what they probably really want anyway is a Postgres server
>>> cluster of two servers that stay in synch with each other, and can
>>> simultaneously accept read and write requests. Are there any opinions
>>> here about the best way to set this up?
>>>
>>
>> There is no "good" way to do this. There are some application specific
>> ways but it depends on their needs.
>>
>> Joshua D. Drake
>>
>>
>> --
>> Command Prompt, Inc. - http://www.commandprompt.com/ 509-416-6579
>> PostgreSQL Support, Training, Professional Services and Development
>> High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
>> For my dreams of your image that blossoms
>> a rose in the deeps of my heart. - W.B. Yeats
>>
>>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/**mailpref/pgsql-admin<http://www.postgresql.org/mailpref/pgsql-admin;
>>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: PG server clustering
@ 2013-10-17 21:42 ktm@rice.edu <ktm@rice.edu>
parent: Payal Singh <payal@omniti.com>
0 siblings, 0 replies; 5+ messages in thread
From: ktm@rice.edu @ 2013-10-17 21:42 UTC (permalink / raw)
To: Payal Singh <payal@omniti.com>; +Cc: Joseph Mays <mays@win.net>; pgsql-admin
On Thu, Oct 17, 2013 at 04:51:21PM -0400, Payal Singh wrote:
> Looks like you should check out the following instead, which are better
> suited to your needs of a multi-master replication system :
> http://postgres-r.org/
> http://bucardo.org/
>
Also http://postgres-xc.sourceforge.net could be an option.
Cheers,
Ken
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2013-10-17 21:42 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-10-17 19:32 PG server clustering Joseph Mays <mays@win.net>
2013-10-17 20:23 ` Joshua D. Drake <jd@commandprompt.com>
2013-10-17 20:30 ` Payal Singh <payal@omniti.com>
2013-10-17 20:51 ` Payal Singh <payal@omniti.com>
2013-10-17 21:42 ` ktm@rice.edu <ktm@rice.edu>
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