> The idea is to allow configuration of standby servers such that they have >> there own set of replication parameters as per requirements. >> > > How does this interplay with the synchronous_standby_names parameter ? Or > do you think that becomes irrelevant if we do like what you are suggesting > above ? AFAIK synchronous_standby_names was added because we wanted to give > master control on which standbys can become SYNC standbys and in what order > of priority. But if we do what you are suggesting above, I wonder if we can > just have an explicit knob to make a standby a SYNC standby. Say something > like: standby1.sync_mode = SYNC|ASYNC. > > I have same thought in my mind. We can handover these controls to user and he will decide the nature and priority of standby (SYNC or ASYNC) The user will be then more sure about his settings (currently is is depend on time at which standby connects to master)
> The other purpose of synchronous_standby_names is to define order of > preference for sync standbys. Even that can then be explicitly specified > using this mechanism. > > Yes. In that case the setup would be standby1.sync_mode = SYNC|ASYNC. standby1.priority = 1 standby1.wal_Sender_timeout = 40s . . standby1.guc = value . I am not sure but may be we can even allow to set synchronous_commit at > each standby level. So depending on the synchronous_commit setting of each > standby and their priorities also explicitly defined by this mechanism, > master will decide which standbys to wait for at the commit time. > > That's a really good suggestion. If we become successful in combining behavior of synchronous_commit with each standby standby then that would be great change and each standby has its own synchronization level.