Re: Sync Rep and shutdown Re: Sync Rep v19

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Sync Rep and shutdown Re: Sync Rep v19
Дата
Msg-id AANLkTimXEQ0UcR3stAGaOYidf8VGeL-xn+1WN13xAm-q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sync Rep and shutdown Re: Sync Rep v19  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Thu, Mar 17, 2011 at 8:24 AM, Heikki Linnakangas
<heikki.linnakangas@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Sync Rep and shutdown Re: Sync Rep v19
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Rectifying wrong Date outputs