Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wXChX-0037bP-1w for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jun 2026 06:46:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXChW-009eQ2-1L for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jun 2026 06:46:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wXChW-009ePq-04 for pgsql-hackers@lists.postgresql.org; Wed, 10 Jun 2026 06:46:10 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wXChU-00000001y3n-1u4I for pgsql-hackers@postgresql.org; Wed, 10 Jun 2026 06:46:09 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2c0c1e0d00bso61796695ad.0 for ; Tue, 09 Jun 2026 23:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1781073967; cv=none; d=google.com; s=arc-20240605; b=Ymcq9pRrcsYDJUeAcH+ziLYErPeKAI5OUeY68+LXA/UL799C/QorN2r9xzihCiEDvn 6g+p3hL/6d4G2cE7x41Re5LHBJBbzU1liXajFq+lZNMmfVegZk37oQ3MIievkRUyEFef PumJTS3oKq7DMPqz1WTEIwrEYErl3TPqiuvp8y9JgJBD3bW20Ba/cEv5lzrH9wewWhIX vijcB70RDJ1rnod4f7AChadauF1JgPGEYPwBRS/lHDx3p/VZLvG+mSct30OP3yIMKBB6 pGC4A0wEjSd/VH43H2pxYfsIRcz42vxPnP/BbcvahyyKZZxNM36tH+VT0U9Te0tH1qNp Lq0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=/X8rWdCH6qOix0bvStfMDm5urJlZLQqKw2WZwwqWO1M=; fh=Y4bF3jz+mh8yj2o3TXnA2+IwZfTNvR/u0afdozIoUkc=; b=e8anEn4SRxxS369r4Nh+fYj8ShuH1UgcaqAAbqBy3F/SKBy1gYxpNt3I72pGzkiR4g 7GnEKicrftHfhj+nTtIwlnF3Tus4kB0LNkhbpp9vlPM/nIHpqc7OoqndDDdTEueG2zX0 dGGuxpwrqMJvAb1uvHLf5iedajMMfR/pVC0amt3Re0gI22G66ci7Qrt71YF3aWVJFLeU ZO6NmiWK0C9TNnmokARew/fc2pEeaWPSKpf09uJyOnSaOS/z8QIL9aPRAGWDgVTQw/l4 KuIUNzouTcNkWFnsrVQncjjXnorLi2UD6H99Rnb8N3qzR+yjNRW/PNnBSWz53lggrXZ1 cugw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781073967; x=1781678767; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/X8rWdCH6qOix0bvStfMDm5urJlZLQqKw2WZwwqWO1M=; b=RpyKmzQB5tX4V5UZJb3K/6mRoUrEwDJmy5Y2ikZZ5DEssaAIduie1KhdpikXgNQdhi gE82CeV0BUjnAl/CPAQqXEKcM8ETxdgOQrf+/u4K/UL7R/gxghnxX+IUf7EWBBz0N5Vz Rimum+YzmSD1V5pndsvvqUQKxH0yzasYGgKJkN3Qpr2TVSUSH9A5q0izT69LZdj0qbBa AIepJA8XwHU+uSEBzwtEgd6L4nsWK57sGGwK5nWh7Si6SHR/inPr79DlDF/CIZ/owC1F 8KuIot+h74I2bn0/hDRCJLU6VLWu4SehO9u7VWDkEQpkRIE0fLosuyneytPJNMSoyrqW cJEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781073967; x=1781678767; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/X8rWdCH6qOix0bvStfMDm5urJlZLQqKw2WZwwqWO1M=; b=RrfXIkku6XfkTQhN+953F1xvRxaDIU0YWDwWTUpAT5X6INWqYbB3A95WcS8+MOGXVZ wRf0yimsgFCrcr/5a0YgkDbKGtB0RUTyj9E1yJAr7KNrs+uGnQbfeZnF8yPeWpqEZrjJ GT4iUb+4LH+yPFQYWPzpkrxoghM7ncL4g0K3Cb5YtyNJDHTmr91tgJ0Tkb9j+Avsit1q PA6PFOK9GKqz2sQhrQUBy5Tt2zhFw2638MTfKjSXZvvXc6xQCa32k50wnYZaGmN8zzEK jUJYT1K8w/M0AMqZQwVEX3jxPUlrcawTTuMnljLxDwCuOoZUpLC+4OwKeF59R7YxFdPs oi9g== X-Forwarded-Encrypted: i=1; AFNElJ+EpEbuUzW5Z49yxJAe4if+B8MKAK3JCCFAE4jJLyhLE3qwzfMyxyyjvt5GISEaWX8z4ZiNp9pQCqHIhVrj@postgresql.org X-Gm-Message-State: AOJu0YztZHFybLIlz6FlooT8F72o64Fwg07r6Ckfg3cW8Q8qvxcrtJqB SrLDgFVbJWJqdphPQjuRGdoc4rSzXOOAYteEZ7/J1oWB4+wshxHR7Gnf6TBx14EFSIbyrgcHgfL nXYS7Htvbo/Wnxati4wY4+y4DxHk7vyY= X-Gm-Gg: Acq92OG14RGgdHSdr4oFT50w437mADey6s9GF4ihO/OaSjoqPiidfn/3Qf8Ql5spNSQ MuG+EQgvnxcELg529P/2x7HsSbbFF4dMa4ciSwHWHGUGZLtDvLRAdt+DeOOlHKX7G8Lx1WsO/uN KlapmPmj/R3lst8Vx7AKNM/bMXMm+Fqa9ofP0a/edgxIlF3DFEVnHJab19OXjpy8IGuiPUwUeay bUlMRFLZi3pf5XnH/v9oEI0zlOr+D0caSNsRABCtiI3Lol7AqZtQWQsAStxnocvaaiVICaFHBOK dlLd6k17GknAesjx8IXzuSoooTrXWJ1VV2rORCNMKPcAAk139cUkFHlX5D0p/oJnBgL2yhCa X-Received: by 2002:a17:902:f711:b0:2c0:ab82:6ba7 with SMTP id d9443c01a7336-2c1e85ad8d7mr281626035ad.33.1781073967460; Tue, 09 Jun 2026 23:46:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: shveta malik Date: Wed, 10 Jun 2026 12:15:52 +0530 X-Gm-Features: AVVi8CdHdSS72MP6mydl0TU7D5MMa2Z4JndqE09W7NXwAMxzJoYl9XYi--cVGig Message-ID: Subject: Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication To: Amit Kapila , Ashutosh Sharma Cc: "Zhijie Hou (Fujitsu)" , Ajin Cherian , SATYANARAYANA NARLAPURAM , PostgreSQL-development , PostgreSQL Hackers , shveta malik Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Please find a few comments on June8 version fo patches: 1) patch001: SYNC_REP_DEFAULT: do we need to give one-line comment for this somewhere as unlike PRIORITY and QUORUM, it is not self-explanatory. patch002: 2) It is better to avoid mentioning it as 'synchronized standby slots'. We can make it as 'synchronized_standby_slots' in below comments: + /* Parse the synchronized standby slots configuration */ + * Report problem states for synchronized standby slots that prevented the 3) For these error-messages too, we need to mention GUC name to give better clarity. + GUC_check_errmsg("number of synchronized standby slots (%d) must not exceed the number of unique listed slots (%d)", + syncrep_parse_result->num_sync, + syncrep_parse_result->nmembers); How about: GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE); GUC_check_errmsg("invalid value for parameter \"%s\: synchronization requirement (%d) exceeds the number of unique listed slots (%d)", "synchronized_standby_slots", syncrep_parse_result->num_sync, syncrep_parse_result->nmembers); Or GUC_check_errmsg("invalid value for parameter \"%s\: required number of synchronized standby slots (%d) exceeds the number of unique listed slots (%d)", "synchronized_standby_slots", syncrep_parse_result->num_sync, syncrep_parse_result->nmembers); 3) + GUC_check_errmsg("number of synchronized standby slots (%d) must be greater than zero", + syncrep_parse_result->num_sync) How about: GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE); GUC_check_errmsg("invalid value for parameter \"%s\: required number of synchronized standby slots (%d) must be greater than zero", "synchronized_standby_slots", syncrep_parse_result->num_sync); --- Or, better yet, we can split the messages and details for both, example: GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE); GUC_check_errmsg("invalid value for parameter \"%s\", "synchronized_standby_slots"); GUC_check_errdetail("The required number of synchronized standby slots (%d) exceeds the number of unique listed slots (%d)", syncrep_parse_result->num_sync, syncrep_parse_result->nmembers);) 4) +ReportUnavailableSyncStandbySlots(SyncStandbySlotsStateInfo * slot_states We can get rid of space before slot_states. I think pgindent might have put it in my patch. Sorry for the trouble. 5) 003: - wait_for_all = (required == synchronized_standby_slots_config->nslotnames); + wait_for_all = + (synchronized_standby_slots_config->syncrep_method == SYNC_REP_DEFAULT); This change can be moved to 002, right? thanks Shveta