Re: Support for N synchronous standby servers - take 2

From: Beena Emerson <memissemerson(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Support for N synchronous standby servers - take 2
Date: 2015-09-10 18:41:07
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers


Please find attached the WIP patch for the proposed feature. It is built
based on the already discussed design.

Changes made:
- add new parameter "sync_file" to provide the location of the pg_syncinfo
file. The default is 'ConfigDir/pg_syncinfo.conf', same as for pg_hba and
pg_ident file.
- pg_syncinfo file will hold the sync rep information in the approved JSON
- synchronous_standby_names can be set to 'pg_syncinfo.conf' to read the
JSON value stored in the file.
- All the standbys mentioned in the s_s_names or the pg_syncinfo file
currently get the priority as 1 and all others as 0 (async)
- Various functions in syncrep.c to read the json file and store the values
in a struct to be used in checking the quorum status of syncrep standbys
(SyncRepGetQuorumRecPtr function).

It does not support the current behavior for synchronous_standby_names =
'*'. I am yet to thoroughly test the patch.


Beena Emerson

Attachment Content-Type Size
WIP_multiple_syncrep.patch application/octet-stream 26.0 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-09-10 19:23:13 Re: more RLS oversights
Previous Message chenhj 2015-09-10 18:07:37 Re: A better translation version of Chinese forpsql/po/zh_CN.po file