Hi,

When the number of sync standbys is set to 0 in s_s_names, the assersion
failure happens as follows. This means that current multiple syncrep code
assumes that the num of sync standbys must be greater than 0. But we forgot
to forbid users from setting that num to 0. This is an oversight in multiple
syncrep patch (so my fault...). Attached patch forbits that.

TRAP: FailedAssertion("!(((bool) 0))", File: "syncrep.c", Line: 711)

Regards,

-- 
Fujii Masao
*** a/src/backend/replication/syncrep.c
--- b/src/backend/replication/syncrep.c
***************
*** 924,929 **** check_synchronous_standby_names(char **newval, void **extra, GucSource source)
--- 924,936 ----
  			return false;
  		}
  
+ 		if (syncrep_parse_result->num_sync <= 0)
+ 		{
+ 			GUC_check_errmsg("number of synchronous standbys (%d) must be greater than zero",
+ 							 syncrep_parse_result->num_sync);
+ 			return false;
+ 		}
+ 
  		/* GUC extra value must be malloc'd, not palloc'd */
  		pconf = (SyncRepConfigData *)
  			malloc(syncrep_parse_result->config_size);
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to