Re: Support for N synchronous standby servers - take 2 - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Support for N synchronous standby servers - take 2
Date
Msg-id CAD21AoD50zOocwUg2C1EEEwsgsvngd8cysVVXxChDqpUO6ykOQ@mail.gmail.com
Whole thread Raw
In response to Re: Support for N synchronous standby servers - take 2  (Beena Emerson <memissemerson@gmail.com>)
Responses Re: Support for N synchronous standby servers - take 2
List pgsql-hackers
On Thu, Jul 30, 2015 at 2:16 PM, Beena Emerson <memissemerson@gmail.com> wrote:
> Hello,
>
> Just looking at how the 2 differnt methods can be used to set the s_s_names
> value.
>
> 1. For a simple case where quorum is required for a single group the JSON
> could be:
>
>  {
>          "sync_standby_names":
>          {
>                  "quorum":2,
>                  "nodes":
>                  [ "node1","node2","node3" ]
>          }
>  }
>
> or
>
>  {
>          "sync_standby_names":
>          {
>                  "quorum":2,
>                  "group": "cluster1"
>          },
>          "groups":
>          {
>                  "cluster1":["node1","node2","node3"]
>          }
>  }
>
> Language:
> 2(node1, node2, node3)
>
>
> 2. For having quorum between different groups and node:
>  {
>          "sync_standby_names":
>          {
>                  "quorum":2,
>                  "nodes":
>                     [
>                         {"priority":1,"nodes":["node0"]},
>                         {"quorum":2,"group": "cluster1"}
>                     ]
>          },
>          "groups":
>          {
>                  "cluster1":["node1","node2","node3"]
>          }
>  }
>
> or
>  {
>          "sync_standby_names":
>          {
>                  "quorum":2,
>                  "nodes":
>                     [
>                         {"priority":1,"group": "cluster2"},
>                         {"quorum":2,"group": "cluster1"}
>                     ]
>          },
>          "groups":
>          {
>                  "cluster1":["node1","node2","node3"],
>                  "cluster2":["node0"]
>          }
>  }
>
> Language:
> 2 (node0, cluster1: 2(node1, node2, node3))
>
> Since there will not be many nesting and grouping, I still prefer new
> language to JSON.
> I understand one can easily, modify/add groups in JSON using in built
> functions but I think changes will not be done too often.
>

If we decided to use dedicated language, the syntax checker for that
language is needed, via SQL or something.
Otherwise we will not be able to know whether the parsing that value
will be done correctly, until reloading or restarting server.

Regards,

--
Masahiko Sawada



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: tablecmds.c and lock hierarchy
Next
From: Michael Paquier
Date:
Subject: Re: Support for N synchronous standby servers - take 2