From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | alexondi <alexondi(at)rambler(dot)ru> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: synchronous_standby_names with '*' |
Date: | 2011-08-19 10:47:36 |
Message-ID: | CAHGQGwESuFKYXCUeYmxtRU31H-iwQSUAQ8Q1yOn-wQnWOzd8bA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Aug 19, 2011 at 7:06 PM, alexondi <alexondi(at)rambler(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | alexondi | 2011-08-19 11:04:08 | Re: synchronous_standby_names with '*' |
Previous Message | alexondi | 2011-08-19 10:06:36 | synchronous_standby_names with '*' |