mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Improve documentation and comment for quorum-based sync replication.
Author: Masahiko Sawada, heavily modified by me Discussion: http://postgr.es/m/CAHGQGwEKOw=SmPLxJzkBsH6wwDBgOnVz46QjHbtsiZ-d-2RGUg@mail.gmail.com
This commit is contained in:
@ -53,6 +53,10 @@
|
||||
* in the list. All the standbys appearing in the list are considered as
|
||||
* candidates for quorum synchronous standbys.
|
||||
*
|
||||
* If neither FIRST nor ANY is specified, FIRST is used as the method.
|
||||
* This is for backward compatibility with 9.6 or before where only a
|
||||
* priority-based sync replication was supported.
|
||||
*
|
||||
* Before the standbys chosen from synchronous_standby_names can
|
||||
* become the synchronous standbys they must have caught up with
|
||||
* the primary; that may take some time. Once caught up,
|
||||
@ -629,6 +633,7 @@ SyncRepGetNthLatestSyncRecPtr(XLogRecPtr *writePtr, XLogRecPtr *flushPtr,
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Sort each array in descending order */
|
||||
qsort(write_array, len, sizeof(XLogRecPtr), cmp_lsn);
|
||||
qsort(flush_array, len, sizeof(XLogRecPtr), cmp_lsn);
|
||||
qsort(apply_array, len, sizeof(XLogRecPtr), cmp_lsn);
|
||||
|
Reference in New Issue
Block a user