Re: synchronous_standby_names with '*'

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: synchronous_standby_names with '*'
Дата
Msg-id CAHGQGwESuFKYXCUeYmxtRU31H-iwQSUAQ8Q1yOn-wQnWOzd8bA@mail.gmail.com
обсуждение исходный текст
Ответ на synchronous_standby_names with '*'  (alexondi <alexondi@rambler.ru>)
Ответы Re: synchronous_standby_names with '*'
Список pgsql-general
On Fri, Aug 19, 2011 at 7:06 PM, alexondi <alexondi@rambler.ru> wrote:
> Hi!
> I try create master for replication and in his config I set
> synchronous_standby_names = '*'
> so I can connect with other slave's (name of this slave I don't know at this
> moment)
> But if I try execute some commands (I hung on 'create database') my program
> hang and after some time I see
> in processes
> ... create database waiting for 0/XXXXXX
> and when I strace to wal I see
> ...
> select ... timeout
> getpid()
> select ... timeout
> getpid()
> ...
> and so on.
> What so '*' mean in this GUC?

Setting synchronous_standby_names forces the master to perform
synchronous replication. If synchronous_commit is set to 'on',
all the transactions must wait for their WAL to be replicated to
the standby. Since you set synchronous_standby_names to '*',
"create database" hanged, i.e., was waiting for its WAL to be
replicated to the standby.

Only standby whose application_name matches synchronous_standby_names
can run as synchronous standby. '*' matches any application_name, so
'*' means that any standby can run as synchronous one.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

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

Предыдущее
От: alexondi
Дата:
Сообщение: synchronous_standby_names with '*'
Следующее
От: alexondi
Дата:
Сообщение: Re: synchronous_standby_names with '*'