On Thu, Mar 17, 2011 at 8:24 AM, Heikki Linnakangas <heikki.linnakan...@enterprisedb.com> wrote: > Hmm, so setting synchronous_standby_names to '' takes effect immediately, > but other changes to it don't apply to already-blocked commits. That seems a > bit inconsistent. Perhaps walwriter should store the parsed list of > standby-names in shared memory, not just a boolean.
I don't think this is necessary. In general, the current or potential WAL sender processes are responsible for working out among themselves whose job it is to release waiters, and doing it. As long as synchronous_standby_names is non-empty, then either (1) there are one or more standbys connected that can take on the role of synchronous standby, and whoever does will release waiters or (2) there are no standbys connected that can take on the role of synchronous standbys, in which case no waiters should be released until one connects. But when synchronous_standby_names becomes completely empty, that doesn't mean "wait until a standby connects whose application name is in the empty set and make him the synchronous standby" but rather "synchronous replication is administratively disabled, don't wait in the first place". So we just need a Boolean flag. > +1 otherwise. Thanks. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers