postgresql/src/backend
Fujii Masao 93eb619cd3 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>
2016-12-17 02:22:15 +09:00
..
access Simplify LWLock tranche machinery by removing array_base/array_stride. 2016-12-16 11:29:23 -05:00
bootstrap Support condition variables. 2016-11-22 14:27:11 -05:00
catalog Fix bugs in RelationGetPartitionDispatchInfo. 2016-12-13 11:29:08 -05:00
commands Clean up code, comments, and formatting for table partitioning. 2016-12-13 10:59:14 -05:00
executor Unbreak Finalize HashAggregate over Partial HashAggregate. 2016-12-16 10:03:08 -05:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Permit dump/reload of not-too-large >1GB tuples 2016-12-02 00:34:01 -03:00
libpq Refactor the code for verifying user's password. 2016-12-12 12:48:13 +02:00
main Remove barrier.h 2016-11-22 20:28:24 -05:00
nodes Fix reporting of column typmods for multi-row VALUES constructs. 2016-12-08 11:40:02 -05:00
optimizer Prevent planagg.c from failing on queries containing CTEs. 2016-12-13 13:20:37 -05:00
parser Fix reporting of column typmods for multi-row VALUES constructs. 2016-12-08 11:40:02 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Make the different Unix-y semaphore implementations ABI-compatible. 2016-12-12 13:32:10 -05:00
postmaster Simplify LWLock tranche machinery by removing array_base/array_stride. 2016-12-16 11:29:23 -05:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication Ensure that num_sync is greater than zero in synchronous_standby_names. 2016-12-17 02:22:15 +09:00
rewrite Implement table partitioning. 2016-12-07 13:17:55 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Simplify LWLock tranche machinery by removing array_base/array_stride. 2016-12-16 11:29:23 -05:00
tcop Add support for temporary replication slots 2016-12-12 08:38:17 -05:00
tsearch Improve documentation around TS_execute(). 2016-12-16 11:50:32 -05:00
utils Improve documentation around TS_execute(). 2016-12-16 11:50:32 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Straighten out some whitespace 2016-11-29 15:08:14 -05:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00