Check the number of potential synchronous standbys - Mailing list pgsql-hackers

From 张文杰
Subject Check the number of potential synchronous standbys
Date
Msg-id tencent_9102665063EC73FE8A037FEA09563D832306@qq.com
Whole thread Raw
Responses Re: Check the number of potential synchronous standbys
List pgsql-hackers
Hi all,

When the number of potential synchronous standbys is smaller than num_sync, such as 'FIRST 3 (1,2)', 'ANY 4 (1,2,3)' in the synchronous_standby_namesthe processes will wait for synchronous replication forever. 
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #2a00ff}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c}

Obviously, it's not expected. I think return false and a error message may be better. And attached is a patch that implements the simple check. 


p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c}

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c}

What do you think about this?


--
Zhang Wenjie

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c} span.s1 {font: 14.0px '.PingFang SC'} p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c} p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c} p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px 'Helvetica Neue'; color: #14171c}
Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs
Next
From: Amit Khandekar
Date:
Subject: Re: Minimal logical decoding on standbys