Обсуждение: PostgreSQL Active-Active

Поиск
Список
Период
Сортировка

PostgreSQL Active-Active

От
Dhandapani Shanmugam
Дата:
Hi Gurus,

Do we have active-active setup in postgreSQL, like we have in oracle RAC?. Sorry if this question has been addressed already. What will be best open source HA for postgresql with zero RTO and RPO.

-D

Re: PostgreSQL Active-Active

От
Stephen Frost
Дата:
Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best open
> source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with
patroni, etcd, and synchronous replication.  Note that this will be a
shared-nothing architecture, avoiding the risk that something bad
happens with the storage system but requiring that the data be
replicated multiple times.  Using synchronous replication means that you
have to have the nodes all close to each other, of course, but meets the
zero RPO.  Zero RTO is just silly, but with patroni and haproxy you can
detect and failover pretty darn fast.

Thanks!

Stephen

Вложения

Re: PostgreSQL Active-Active

От
Stephen Frost
Дата:
Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best open
> source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with
patroni, etcd, and synchronous replication.  Note that this will be a
shared-nothing architecture, avoiding the risk that something bad
happens with the storage system but requiring that the data be
replicated multiple times.  Using synchronous replication means that you
have to have the nodes all close to each other, of course, but meets the
zero RPO.  Zero RTO is just silly, but with patroni and haproxy you can
detect and failover pretty darn fast.

Thanks!

Stephen

Вложения

Re: PostgreSQL Active-Active

От
Laurenz Albe
Дата:
Dhandapani Shanmugam wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already.
> What will be best open source HA for postgresql with zero RTO and RPO.

No, PostgreSQL does not have a shared storage cluster technology like RAC,
and I don't think it ever will: too complicated, does not scale well
(cache fusion, global SCN).

The normal way is to use physical replication with some third-party
cluster software that handles the failover.

There is *always* a short down time, but it shouldn't be more than a minute.
If you need to avoid data loss, use synchronous replication, but be aware
that it requires a low latency network, else your write throughput will
be very bad.

Yours,
Laurenz Albe


Re: PostgreSQL Active-Active

От
Laurenz Albe
Дата:
Dhandapani Shanmugam wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already.
> What will be best open source HA for postgresql with zero RTO and RPO.

No, PostgreSQL does not have a shared storage cluster technology like RAC,
and I don't think it ever will: too complicated, does not scale well
(cache fusion, global SCN).

The normal way is to use physical replication with some third-party
cluster software that handles the failover.

There is *always* a short down time, but it shouldn't be more than a minute.
If you need to avoid data loss, use synchronous replication, but be aware
that it requires a low latency network, else your write throughput will
be very bad.

Yours,
Laurenz Albe


Re: PostgreSQL Active-Active

От
Thomas Kellerer
Дата:
Dhandapani Shanmugam schrieb am 06.02.2018 um 12:01:
> Do we have active-active setup in postgreSQL, like we have in oracle
> RAC?. Sorry if this question has been addressed already. What will be
> best open source HA for postgresql with zero RTO and RPO.

I think the closest to Oracle's RAC is Postgres-XL

Postgres-XL however does not make the same mistake as Oracle did, because they are not using a shared storage
architecture.

https://www.2ndquadrant.com/en/resources/postgres-xl/




Re: PostgreSQL Active-Active

От
Shreeyansh Dba
Дата:
You can achieve this HA with forward and backward reverse synchronous streaming replication with 3 nodes automatic failover with pgpool in PostgreSQL.

There is always downtime but it should not be more than a minute its depends on your hardware and network bandwidth speed availability.

-- 
http://www.shreeyansh.com


On Tue, Feb 6, 2018 at 4:31 PM, Dhandapani Shanmugam <postgresql95@gmail.com> wrote:
Hi Gurus,

Do we have active-active setup in postgreSQL, like we have in oracle RAC?. Sorry if this question has been addressed already. What will be best open source HA for postgresql with zero RTO and RPO.

-D


Re: PostgreSQL Active-Active

От
Shreeyansh Dba
Дата:
You can achieve this HA with forward and backward reverse synchronous streaming replication with 3 nodes automatic failover with pgpool in PostgreSQL.

There is always downtime but it should not be more than a minute its depends on your hardware and network bandwidth speed availability.

-- 
http://www.shreeyansh.com


On Tue, Feb 6, 2018 at 4:31 PM, Dhandapani Shanmugam <postgresql95@gmail.com> wrote:
Hi Gurus,

Do we have active-active setup in postgreSQL, like we have in oracle RAC?. Sorry if this question has been addressed already. What will be best open source HA for postgresql with zero RTO and RPO.

-D


RE: PostgreSQL Active-Active

От
"Lazaro Garcia"
Дата:
Do you have any tutorial about patroni + ha-proxy with postgresql (what
about load balancing with this setup?)

Regards.

-----Mensaje original-----
De: Stephen Frost [mailto:sfrost@snowman.net] 
Enviado el: martes, 6 de febrero de 2018 06:12 a. m.
Para: Dhandapani Shanmugam
CC: pgsql-admin; pgsql-general@postgresql.org
Asunto: Re: PostgreSQL Active-Active

Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best 
> open source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with patroni,
etcd, and synchronous replication.  Note that this will be a shared-nothing
architecture, avoiding the risk that something bad happens with the storage
system but requiring that the data be replicated multiple times.  Using
synchronous replication means that you have to have the nodes all close to
each other, of course, but meets the zero RPO.  Zero RTO is just silly, but
with patroni and haproxy you can detect and failover pretty darn fast.

Thanks!

Stephen



RE: PostgreSQL Active-Active

От
"Lazaro Garcia"
Дата:
Do you have any tutorial about patroni + ha-proxy with postgresql (what
about load balancing with this setup?)

Regards.

-----Mensaje original-----
De: Stephen Frost [mailto:sfrost@snowman.net] 
Enviado el: martes, 6 de febrero de 2018 06:12 a. m.
Para: Dhandapani Shanmugam
CC: pgsql-admin; pgsql-general@postgresql.org
Asunto: Re: PostgreSQL Active-Active

Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best 
> open source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with patroni,
etcd, and synchronous replication.  Note that this will be a shared-nothing
architecture, avoiding the risk that something bad happens with the storage
system but requiring that the data be replicated multiple times.  Using
synchronous replication means that you have to have the nodes all close to
each other, of course, but meets the zero RPO.  Zero RTO is just silly, but
with patroni and haproxy you can detect and failover pretty darn fast.

Thanks!

Stephen



RE: PostgreSQL Active-Active

От
Alexander Kukushkin
Дата:
I would recommend to read 

And actually we just did a 3 hours tutorial at pgconf.ru and soon we will publish slides.

In April we will give the Patroni tutorial  at postgresconf.us

On 7 Feb 2018 17:29, "Lazaro Garcia" <lazaro3487@gmail.com> wrote:
Do you have any tutorial about patroni + ha-proxy with postgresql (what
about load balancing with this setup?)

Regards.

-----Mensaje original-----
De: Stephen Frost [mailto:sfrost@snowman.net]
Enviado el: martes, 6 de febrero de 2018 06:12 a. m.
Para: Dhandapani Shanmugam
CC: pgsql-admin; pgsql-general@postgresql.org
Asunto: Re: PostgreSQL Active-Active

Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best
> open source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with patroni,
etcd, and synchronous replication.  Note that this will be a shared-nothing
architecture, avoiding the risk that something bad happens with the storage
system but requiring that the data be replicated multiple times.  Using
synchronous replication means that you have to have the nodes all close to
each other, of course, but meets the zero RPO.  Zero RTO is just silly, but
with patroni and haproxy you can detect and failover pretty darn fast.

Thanks!

Stephen


Regard,
Alexander Kukushkin

RE: PostgreSQL Active-Active

От
Alexander Kukushkin
Дата:
I would recommend to read 

And actually we just did a 3 hours tutorial at pgconf.ru and soon we will publish slides.

In April we will give the Patroni tutorial  at postgresconf.us

On 7 Feb 2018 17:29, "Lazaro Garcia" <lazaro3487@gmail.com> wrote:
Do you have any tutorial about patroni + ha-proxy with postgresql (what
about load balancing with this setup?)

Regards.

-----Mensaje original-----
De: Stephen Frost [mailto:sfrost@snowman.net]
Enviado el: martes, 6 de febrero de 2018 06:12 a. m.
Para: Dhandapani Shanmugam
CC: pgsql-admin; pgsql-general@postgresql.org
Asunto: Re: PostgreSQL Active-Active

Greetings,

* Dhandapani Shanmugam (postgresql95@gmail.com) wrote:
> Do we have active-active setup in postgreSQL, like we have in oracle RAC?.
> Sorry if this question has been addressed already. What will be best
> open source HA for postgresql with zero RTO and RPO.

What you're probably looking for is a 3 (or more) node setup with patroni,
etcd, and synchronous replication.  Note that this will be a shared-nothing
architecture, avoiding the risk that something bad happens with the storage
system but requiring that the data be replicated multiple times.  Using
synchronous replication means that you have to have the nodes all close to
each other, of course, but meets the zero RPO.  Zero RTO is just silly, but
with patroni and haproxy you can detect and failover pretty darn fast.

Thanks!

Stephen


Regard,
Alexander Kukushkin