pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedSync replication
7+ messages / 4 participants
[nested] [flat]
* Sync replication
@ 2018-01-25 18:06 Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
0 siblings, 1 reply; 7+ messages in thread
From: Azimuddin Mohammed @ 2018-01-25 18:06 UTC (permalink / raw)
To: pgsql-admin; pgsql-general@postgresql.org
I have a question regarding synchronus replication.
If i have a master and standby server will sync replication setup..when my
slave dies and master is still active. Will the transaction completes, or
master will wait for slave to commit the transaction and then commits its. ?
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
@ 2018-01-25 18:23 ` Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Re: Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Rakesh Kumar @ 2018-01-25 18:23 UTC (permalink / raw)
To: azimeiu@gmail.com; pgsql-admin; pgsql-general@postgresql.org
>I have a question regarding synchronus replication.
>If i have a master and standby server will sync replication setup..when my slave dies and master is still active. Will the transaction completes, or >master will wait for slave to commit the transaction and then commits its. ?
Master will wait for slave to come back up. PG"s replication is not the same as SQLServer/DB2/Oracle
where they allow master to continue operating while the slave is down. useful during scheduled maintenance.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
@ 2018-01-26 01:06 ` Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-26 01:09 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:21 ` Re: Sync replication Stephen Frost <sfrost@snowman.net>
0 siblings, 2 replies; 7+ messages in thread
From: Azimuddin Mohammed @ 2018-01-26 01:06 UTC (permalink / raw)
To: Rakesh Kumar <rakeshkumar464@aol.com>; +Cc: pgsql-admin; pgsql-general@postgresql.org
So untill my slave comes up master does not commit any transaction which
means technically my db is non operative?
On Jan 25, 2018 12:23 PM, "Rakesh Kumar" <rakeshkumar464@aol.com> wrote:
>
> >I have a question regarding synchronus replication.
> >If i have a master and standby server will sync replication setup..when
> my slave dies and master is still active. Will the transaction completes,
> or >master will wait for slave to commit the transaction and then commits
> its. ?
>
> Master will wait for slave to come back up. PG"s replication is not the
> same as SQLServer/DB2/Oracle
> where they allow master to continue operating while the slave is down.
> useful during scheduled maintenance.
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Re: Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
@ 2018-01-26 01:09 ` Rakesh Kumar <rakeshkumar464@aol.com>
1 sibling, 0 replies; 7+ messages in thread
From: Rakesh Kumar @ 2018-01-26 01:09 UTC (permalink / raw)
To: azimeiu@gmail.com; +Cc: pgsql-admin; pgsql-general@postgresql.org
correct.
-----Original Message-----
From: Azimuddin Mohammed <azimeiu@gmail.com>
To: Rakesh Kumar <rakeshkumar464@aol.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>; pgsql-general <pgsql-general@postgresql.org>
Sent: Thu, Jan 25, 2018 8:06 pm
Subject: Re: Sync replication
So untill my slave comes up master does not commit any transaction which means technically my db is non operative?
On Jan 25, 2018 12:23 PM, "Rakesh Kumar" <rakeshkumar464@aol.com> wrote:
>I have a question regarding synchronus replication.
>If i have a master and standby server will sync replication setup..when my slave dies and master is still active. Will the transaction completes, or >master will wait for slave to commit the transaction and then commits its. ?
Master will wait for slave to come back up. PG"s replication is not the same as SQLServer/DB2/Oracle
where they allow master to continue operating while the slave is down. useful during scheduled maintenance.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Re: Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
@ 2018-01-26 01:21 ` Stephen Frost <sfrost@snowman.net>
2018-01-26 01:37 ` Re: Sync replication Michael Paquier <michael.paquier@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Stephen Frost @ 2018-01-26 01:21 UTC (permalink / raw)
To: Azimuddin Mohammed <azimeiu@gmail.com>; +Cc: Rakesh Kumar <rakeshkumar464@aol.com>; pgsql-admin; pgsql-general@postgresql.org
Greetings,
On our mailing lists, we prefer that replies be in-line and ask that
users not top-post. Please see my response, in-line, below.
* Azimuddin Mohammed (azimeiu@gmail.com) wrote:
> So untill my slave comes up master does not commit any transaction which
> means technically my db is non operative?
That's correct, which is why it's encouraged to have multiple replicas
configured when using synchronous replication. In v10, it's possible to
specify how many synchronous replicas are required to have acknowledged
a given transaction before a COMMIT is returned to the applicaiton.
Please review the documentation here:
https://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Re: Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-26 01:21 ` Re: Sync replication Stephen Frost <sfrost@snowman.net>
@ 2018-01-26 01:37 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-26 01:46 ` Re: Sync replication Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2018-01-26 01:37 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Azimuddin Mohammed <azimeiu@gmail.com>; Rakesh Kumar <rakeshkumar464@aol.com>; pgsql-admin; pgsql-general@postgresql.org
On Thu, Jan 25, 2018 at 08:21:43PM -0500, Stephen Frost wrote:
> That's correct, which is why it's encouraged to have multiple replicas
> configured when using synchronous replication. In v10, it's possible to
> specify how many synchronous replicas are required to have acknowledged
> a given transaction before a COMMIT is returned to the applicaiton.
> Please review the documentation here:
>
> https://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION
Be careful about the performance impact if there is network latency
between a primary and its standbys. One small correction to what Stephen
says here. It is possible to define multiple synchronous standbys in
v9.6. v10 has added the possibility to define quorum groups. Note that
the grammar as been kept backward-compatible across versions.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Sync replication
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Re: Sync replication Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Re: Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-26 01:21 ` Re: Sync replication Stephen Frost <sfrost@snowman.net>
2018-01-26 01:37 ` Re: Sync replication Michael Paquier <michael.paquier@gmail.com>
@ 2018-01-26 01:46 ` Stephen Frost <sfrost@snowman.net>
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Frost @ 2018-01-26 01:46 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Azimuddin Mohammed <azimeiu@gmail.com>; Rakesh Kumar <rakeshkumar464@aol.com>; pgsql-admin; pgsql-general@postgresql.org
Greetings Michael,
* Michael Paquier (michael.paquier@gmail.com) wrote:
> On Thu, Jan 25, 2018 at 08:21:43PM -0500, Stephen Frost wrote:
> > That's correct, which is why it's encouraged to have multiple replicas
> > configured when using synchronous replication. In v10, it's possible to
> > specify how many synchronous replicas are required to have acknowledged
> > a given transaction before a COMMIT is returned to the applicaiton.
> > Please review the documentation here:
> >
> > https://www.postgresql.org/docs/current/static/warm-standby.html#SYNCHRONOUS-REPLICATION
>
> Be careful about the performance impact if there is network latency
> between a primary and its standbys. One small correction to what Stephen
> says here. It is possible to define multiple synchronous standbys in
> v9.6. v10 has added the possibility to define quorum groups. Note that
> the grammar as been kept backward-compatible across versions.
Ah, yeah, I was thinking of quorum groups when writing that but you're
right that 9.6 added support for multiple synchronous standbys. Older
versions also supported having multiple synchronous standbys configured
but were hard-wired to accept the commit with just one of them
acknowledging it (in a priorty order based on the order of them as
defined in synchronous_standby_names).
Thanks for the clarification!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2018-01-26 01:46 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 18:06 Sync replication Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-25 18:23 ` Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:06 ` Azimuddin Mohammed <azimeiu@gmail.com>
2018-01-26 01:09 ` Rakesh Kumar <rakeshkumar464@aol.com>
2018-01-26 01:21 ` Stephen Frost <sfrost@snowman.net>
2018-01-26 01:37 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-26 01:46 ` Stephen Frost <sfrost@snowman.net>
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