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

From Beena Emerson
Subject Re: Support for N synchronous standby servers - take 2
Date
Msg-id CAOG9ApE4idqgX1mxawDiVEYRiSgPQk4o2rMjoqJFepL3rjgiNQ@mail.gmail.com
Whole thread Raw
In response to Re: Support for N synchronous standby servers - take 2  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Support for N synchronous standby servers - take 2  (Michael Paquier <michael.paquier@gmail.com>)
Re: Support for N synchronous standby servers - take 2  (Sameer Thakur-2 <Sameer.Thakur@nttdata.com>)
Re: Support for N synchronous standby servers - take 2  (Thomas Munro <thomas.munro@enterprisedb.com>)
Re: Support for N synchronous standby servers - take 2  (Sameer Thakur-2 <Sameer.Thakur@nttdata.com>)
List pgsql-hackers
Hello,

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 format.
- 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.

Thoughts?

--
Beena Emerson

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Map basebackup tablespaces using a tablespace_map file
Next
From: Stephen Frost
Date:
Subject: Re: more RLS oversights