pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Ensure that num_sync is greater than zero in synchronous_standby
2+ messages / 1 participants
[nested] [flat]

* pgsql: Ensure that num_sync is greater than zero in synchronous_standby
@ 2016-12-16 17:25  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2016-12-16 17:25 UTC (permalink / raw)
  To: pgsql-committers

Ensure that num_sync is greater than zero in synchronous_standby_names.

Previously num_sync could be set to zero and this setting caused
an assertion failure. This means that multiple synchronous standbys
code should assume that num_sync is greater than zero.
Also setting num_sync to zero is nonsense because it's basically
the configuration for synchronous replication. If users want not to
make transaction commits wait for any standbys,
synchronous_standby_names should be emptied to disable synchronous
replication instead of setting num_sync to zero.

This patch forbids users from setting num_sync to zero in
synchronous_standby_names. If zero is specified, an error will
happen during processing the parameter settings.

Back-patch to 9.6 where multiple synchronous standbys feature was added.

Patch by me. Reviewed by Tom Lane.
Discussion: <CAHGQGwHWB3izc6cXuFLh5kOcAbFXaRhhgwd-X5PeN9TEjxqXwg@mail.gmail.com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/93eb619cd35b8adcfe6c86e34ea45d2e8edd322b

Modified Files
--------------
src/backend/replication/syncrep.c | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Ensure that num_sync is greater than zero in synchronous_standby
@ 2016-12-16 17:26  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2016-12-16 17:26 UTC (permalink / raw)
  To: pgsql-committers

Ensure that num_sync is greater than zero in synchronous_standby_names.

Previously num_sync could be set to zero and this setting caused
an assertion failure. This means that multiple synchronous standbys
code should assume that num_sync is greater than zero.
Also setting num_sync to zero is nonsense because it's basically
the configuration for synchronous replication. If users want not to
make transaction commits wait for any standbys,
synchronous_standby_names should be emptied to disable synchronous
replication instead of setting num_sync to zero.

This patch forbids users from setting num_sync to zero in
synchronous_standby_names. If zero is specified, an error will
happen during processing the parameter settings.

Back-patch to 9.6 where multiple synchronous standbys feature was added.

Patch by me. Reviewed by Tom Lane.
Discussion: <CAHGQGwHWB3izc6cXuFLh5kOcAbFXaRhhgwd-X5PeN9TEjxqXwg@mail.gmail.com>

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6c75fb6b3dbeda4dac19cee8f2d5cc7f38f362ee

Modified Files
--------------
src/backend/replication/syncrep.c | 7 +++++++
1 file changed, 7 insertions(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2016-12-16 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 17:25 pgsql: Ensure that num_sync is greater than zero in synchronous_standby Fujii Masao <fujii@postgresql.org>
2016-12-16 17:26 pgsql: Ensure that num_sync is greater than zero in synchronous_standby Fujii Masao <fujii@postgresql.org>

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