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 1wS86E-002yaI-0Z for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2026 06:50:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wS86B-007QZI-19 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2026 06:50:40 +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 1wS86B-007QZA-02 for pgsql-hackers@lists.postgresql.org; Wed, 27 May 2026 06:50:40 +0000 Received: from mail-dy1-x132e.google.com ([2607:f8b0:4864:20::132e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wS869-00000000ye4-3Hg0 for pgsql-hackers@lists.postgresql.org; Wed, 27 May 2026 06:50:38 +0000 Received: by mail-dy1-x132e.google.com with SMTP id 5a478bee46e88-3045c195251so4735896eec.1 for ; Tue, 26 May 2026 23:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779864636; x=1780469436; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Djx80DDShRzmpu2kQ8IgGOCriVLbBND2wHMbFd1+TR4=; b=CWX1ZrM/eG1DqEzISWbmKPb6lTkEmhjpPaDzqC0v31T5z1hM2bNuxaE9wyILJcCvZO ipH4HiDjdRx6l+v3QOYuYjgEEp97YRfHrNChtREitoGQ+W4WFV1DBrcKts997F5eOoCt 1ugsnTtEeOv0A5jwOw7NarFDuEulE3QWQmyVaAinjZccoDI1688WC5dXG5zHfXcMHA1/ /lYefxpGpJiM29HKNnzPbaFUtK/Hmj5o/mls2XusSTcHtU7dYZzmiqc2IXi8m3w79k4g B2Z90Qx/00PQe/liWDpC8YQffHSGMBBU+raHTA297yqWDuBWI2H2VYd/WoTOFSFvx3iN 1LSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779864636; x=1780469436; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Djx80DDShRzmpu2kQ8IgGOCriVLbBND2wHMbFd1+TR4=; b=mcH2fbNw+sk0yph0g1t+PhZ60UGgkMtNJ7TQrfD0B7XIVQ8Wvg6BxH4ZQ9AU6E13+R VXncIsj7AOeN4abJ/FVP+TO1EOA5Wd+UBUy4VxEVA3lV5x0AKkzf7MppqBW+ThIRuS3l N8XoQuPB7+QrbFxEeDzm3XOAj4YlhZF1A+NDf8aWiohnYe8cczbkbuibrQMnRZM1rQlm tvFxY3f2nr3o6k3jjUFfgvc6Jm0eqruxrJACjFD0cQrN9xaTb7BZZgjxNgXoHDxg/4Cx /D9oGSK6e6l1g0BFlYhXkjdRjomNU1WjQRyll6xc+XwkIY1tOWgB3pBZ43WPcxTVFWyc TxxQ== X-Gm-Message-State: AOJu0YyEBYqon1s7DyI06PZ4Yr5m2iMcuW+jy+RqoYcFB5DdMdmRdb88 z8HD4rrsrhTdH/yXqBoEoXQygatA8DEnZc5G2rDNIPqhjJiKAfdM6abq X-Gm-Gg: Acq92OF5crQHOkzUMUNwcPFwmbyOjQaRg4zM25SSo5BbDQLm7/mFB4NYDPk2ZVTyRNW xFpLcD1WY79mF/DsjBpw0FktbVbVKrRvSn7v3AVmxsugM1/VSE0FtD5AXmpz1jF2ZqfLP6C6GgK kweSDAibjgiuQbJ/Qd/PR5eRL+F3OvOK5t1Rp68dPr/8HS/2UB8KP6a0Atkw4CqWxnzUkEFY7mv CAW7u6YJgv5vrrEafWSv3GzNZI0fgwglXatcMUVS6ApdxHPjSZ6PXmVurk7Vpei1YsbAWsfCQDi y5Z7XB4+MqFFvpgcTdXlXXnTI9twLO1bEfNPqkeCySgf1SjiCK690d0lynk3a5PzuGk2CCyiBMW cs4sE8HpCHtrVtdwSqNyp0d+xnqbpnXTThUy4gbgDE/vc57MPmWIgZwAdk10z1heUSZpTIr61Lh Wakq+IbhoRnIN5DgltkVCrWRt0MJtE2seBPCMHnlSI X-Received: by 2002:a05:7300:a10c:b0:2f2:6dde:df54 with SMTP id 5a478bee46e88-30449146a8bmr9950491eec.33.1779864636480; Tue, 26 May 2026 23:50:36 -0700 (PDT) Received: from smtpclient.apple ([64.32.14.230]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30451ef470dsm12445781eec.4.2026.05.26.23.50.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 May 2026 23:50:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.600.51.1.1\)) Subject: Re: [PATCH] Improve REPACK (CONCURRENTLY) error messages for unsupported configurations From: Chao Li In-Reply-To: Date: Wed, 27 May 2026 14:50:01 +0800 Cc: pgsql-hackers@lists.postgresql.org, =?utf-8?Q?=C3=81lvaro_Herrera?= Content-Transfer-Encoding: quoted-printable Message-Id: <172EB2C2-DE11-4E5B-B115-38A7AD3B6A3D@gmail.com> References: To: Baji Shaik X-Mailer: Apple Mail (2.3864.600.51.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On May 27, 2026, at 11:06, Baji Shaik wrote: >=20 > Hi, >=20 > While exploring the new REPACK (CONCURRENTLY) feature, I noticed=20 > a few user-facing error paths that could be made more accurate. =20 > Patch series of three: >=20 > 0001 -- When wal_level < replica, REPACK (CONCURRENTLY) currently > surfaces generic "replication slots ... wal_level" error > from CheckSlotRequirements(), with a CONTEXT line referring > to an internal worker. Add an upfront check that reports a > REPACK-specific error. >=20 LGTM > 0002 -- check_concurrent_repack_requirements() reports the same > generic "no identity index" error for several distinct > cases, two of which are misleading: REPLICA IDENTITY FULL > (which is set, but the hint says there is no identity), and > a deferrable PK as the only identity (skipped per commit > 832e220d99a, but the hint suggests adding an index that > already exists). Distinguish these cases. >=20 When I was working on 832e220d99a, I actually considered for more = detailed error messages, but I ended up giving up. I think we should be = careful about adding more branches here unless the existing message is = causing significant confusion in practice. So, I personally don=E2=80=99t like 0002. > 0003 -- Four ereport(ERROR) calls in the REPACK CONCURRENTLY code > path lack errcode() and default to ERRCODE_INTERNAL_ERROR. > Add appropriate errcodes; in particular, the > apply_concurrent_update/delete failures map cleanly to > ERRCODE_T_R_SERIALIZATION_FAILURE. >=20 LGTM Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/