Re: Support for N synchronous standby servers - take 2

From: Beena Emerson <memissemerson(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Support for N synchronous standby servers - take 2
Date: 2015-08-04 11:37:51
Message-ID: 1438688271911-5860791.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
>Maybe shoehorning this into the GUC mechanism is the wrong thing, and
>what we really need is a new config file for this. The information
>we're proposing to store seems complex enough to justify that.
>

I think the consensus is that JSON is better.
And using a new file with multi line support would be good.

Name of the file: how about pg_syncinfo.conf?

Backward compatibility: synchronous_standby_names will be supported.
synchronous_standby_names='pg_syncinfo' indicates use of new file.

JSON format:
It would contain 2 main keys: "sync_info" and "groups"
The "sync_info" would consist of "quorum"/"priority" with the count and
"nodes"/"group" with the group name or node list.
The optional "groups" key would list out all the "group" mentioned within
"sync_info" along with the node list.

Ex:
1.
{
"sync_info":
{
"quorum":2,
"nodes":
[
"node1", "node2", "node3"
]
}
}

2.
{
"sync_info":
{
"quorum":2,
"nodes":
[
{"priority":1,"group":"cluster1"},
{"quorum":2,"group": "cluster2"},
"node99"
]
},
"groups":
{
"cluster1":["node11","node12"],
"cluster2":["node21","node22","node23"]
}
}

Thoughts?

-----
Beena Emerson

--
View this message in context: http://postgresql.nabble.com/Support-for-N-synchronous-standby-servers-take-2-tp5849384p5860791.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-08-04 12:15:07 Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Previous Message Ashutosh Bapat 2015-08-04 11:12:23 Re: GROUP BY before JOIN