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 1vsIc3-00FNkv-11 for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Feb 2026 10:47:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsIc2-009ioR-0C for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Feb 2026 10:47:26 +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 1vsIc1-009ioJ-24 for pgsql-hackers@lists.postgresql.org; Tue, 17 Feb 2026 10:47:25 +0000 Received: from mail-dl1-x122f.google.com ([2607:f8b0:4864:20::122f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsIbz-000000012kc-1QY7 for pgsql-hackers@lists.postgresql.org; Tue, 17 Feb 2026 10:47:24 +0000 Received: by mail-dl1-x122f.google.com with SMTP id a92af1059eb24-1248d27f2b9so5126163c88.0 for ; Tue, 17 Feb 2026 02:47:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771325243; cv=none; d=google.com; s=arc-20240605; b=RQg6m6h2Q2jfv5+ZUEHGItcBDUeJpbDbtmb4xIil38MTI2RwlMgwuegz5Yth3klMGf jFxYTQZDqKiuo+XzCU4PhTv9ECcBd+Yp2eWW7A+Ab8nSO0SKbAHrDr2UHbeAnox6f13V o/N/is3Z/xvS5a9ExjmE1VEfavv3x3iKLoxybDYCxIIWalqC0KySKNijjYjmhAehfJeD m49iA+yD1NL6NWPrroHXD4RtoFpir9wkVFD+Nc3AHq58z8LcC5ORs+jPOS9gqYmeRsLF xdEzTB4BxtjTr3S7I+WV9NdtQ0X+rCWqBMs599WG8DYgS2A7A68wLk78TIp8tOdD0BLD lK0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=z1nW9CNo+unjvUV7QN65jLJr78A2AGyjzrnyhoT1w3A=; fh=Mh2sTtxf8teTGUyzAPxu2R5MNdaeW557jqp5rhFkxnY=; b=G1dgRX8oRdvlH4nNN3NtkTXi9E2C8T0ey1QQrYUMH0kIh9GuOV60GjS2TTJOnS8E3h +IUw7ypSn583U7YNEvqouTBrx0LChy/6qWJR8pUXQWUNegGpucr82d2l/saCIH1dvOue 7DL4UIhmKttXV2t4m02qUClrAMYnf4iXVf+AjAnxq5U0uyl/3f0NiS0xwsPRhf2jEfia 7nAooub5caNYM9/eDX4vIxa9ZF1TVvCtRrnWdj67P/ue6U78DCHHlLlAWm+3EDDhJfdh yPuBQrrT3daot+shzKuHnIN7bWGwllfb5QJf1IWcS80DJcIN8deZDXMzanQDMrdFL1hT PYDg==; darn=lists.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=20230601; t=1771325243; x=1771930043; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=z1nW9CNo+unjvUV7QN65jLJr78A2AGyjzrnyhoT1w3A=; b=MZ04/CvPrKI6Ok/6tI6FvXe5e39sUKbFRLmb+aqQohz9wU+W4QLTzbpdWicPsvEqyt ZYmFKNjieXxvxC8JcXg7sfBz4GJoAUkvLONdR7HG9dPb+LmEi1iBRofoBu1e3wx+pGdk YhESlv01BpSCevFQuDpfryy19/W9svxmezjkeetMo4R1AMiKw49OLxDulrPnTX2TuB0y XC2uamAW43f7OJGH0o2E7l1j6kyWwppxlFH6hchv5p5FxUFLUXwLxFW501QssCiCCbwT +2NHNF0xeXuXOy3umMOg03oTEQw8c6hu7RFnecWBT5H9lhHbFrrNYCEFUclBKaFoFBYW azWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771325243; x=1771930043; h=content-transfer-encoding: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=z1nW9CNo+unjvUV7QN65jLJr78A2AGyjzrnyhoT1w3A=; b=BGcx75nWaBMvgB8KRJgi+QLedzNy82GqK66bdE+JtvWumt0Y/gn8LxSkHutMDJt9kg Ti0IYg2szVqlV1um4XIM2P/eCGH6TNWdRl/irBvu2WxEv65EXPgDgEAC59ROPEcPTzhQ Ix/OupDrGPaSihiQlb9ya7OM7zUYaA8qrg9dW2g5yibdP7bbHwjp1jIqxg9pBVOcN0M6 am5XipV6Au46+7pbqhNOugm7fKS+J+sMuqQD/olUW/4c2fubM4C/WegdxTizGJAb6FNJ oCJm4MEzYaYkcDy9LRD0rYHsU2h/wkSFb57B5+meP0FlaTiOAhK8vXCvf6Md2xx77QSt 192Q== X-Forwarded-Encrypted: i=1; AJvYcCXSZNC+e1lY1KJdfI08M4FW317Sie0Uxyhwe/rkQMxHugEA70KXKNYeUmqOshQEtG/9g/fGik1B55TH/trn@lists.postgresql.org X-Gm-Message-State: AOJu0Yw/lROLaPTuN3G7dPHWm8IqQUqH6/CwaKJ/zdhWCXa7uiZHgeEG 21jhEIoD9hpssuDChGAp5j3zktYdLL2S3HyPPpmzZaxO8lORu3OFkE3gY1R/NhiI3zZIHpfRFN0 +et1Upzo/g0y929Ql8jYZngMmKemVdNc= X-Gm-Gg: AZuq6aK5pq3K5bguAvlGka/yHOz+lyVB6l4dvjcGXo1EnM/D+xhBS6R8iemiQvLCqTx vqlKu6EtVDAjSqA0dt0ybOKYTEwVfiVVIor0VskH30nAoE7SeX94boIzw6EWkVgNyEQwSettXOX B7vesZYpt1mjyEVYhrPslKbxmzLS/DHv1akPeijY7jqK9MDjmILmJAgQ4YA1G2jS0OlgGAYHfQR X2rnS86f20p4nPwIWrKpblcmLGAmbKzKTmwkv38TFb4C4EZN1UpB07rwX2Gfj445sMdXCNd4RsH mwHLEzp38jzlhMzlMw== X-Received: by 2002:a05:7022:6ba2:b0:11e:3e9:3ea2 with SMTP id a92af1059eb24-12739853f89mr5289939c88.49.1771325243264; Tue, 17 Feb 2026 02:47:23 -0800 (PST) MIME-Version: 1.0 References: <695cea55.050a0220.253a0.ed88SMTPIN_ADDED_BROKEN@mx.google.com> <695e1440.170a0220.1f9596.3d45SMTPIN_ADDED_BROKEN@mx.google.com> <695feb17.170a0220.1fcace.843fSMTPIN_ADDED_BROKEN@mx.google.com> <6964cc77.170a0220.18c2b8.6cd8SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: From: Soumya S Murali Date: Tue, 17 Feb 2026 16:17:48 +0530 X-Gm-Features: AaiRm538aMDQApwrQCSE63NC3fZ4Jz9ZhIdSkV_OhI96GfdlAcIonKDkM_KG3uU Message-ID: Subject: Re: [PATCH] Expose checkpoint reason to completion log messages. To: Fujii Masao Cc: Michael Banck , VASUKI M , Andres Freund , PostgreSQL Hackers , =?UTF-8?Q?=C3=81lvaro_Herrera?= , melanieplageman@gmail.com, juanjo.santamaria@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all, On Tue, Feb 17, 2026 at 11:25=E2=80=AFAM Fujii Masao wrote: > > On Wed, Jan 14, 2026 at 7:11=E2=80=AFPM Soumya S Murali > wrote: > > Thank you for the detailed review and suggestions. > > Based on the feedback, I have updated the patch to make the checkpoint > > and restart point log formatting fully consistent between start and > > completion log messages. The completion messages now use the same > > format as the start messages without parentheses. I have also replaced > > the term "reason" with the term "flags". The patch has been rebuilt > > and validated with make check and the full recovery TAP test suite, > > and I have manually verified the resulting log output to confirm the > > expected formatting. I am attaching the updated patch for further > > review. Please let me know if any additional adjustments are needed. > > Thanks for updating the patch! > > + if (flags & CHECKPOINT_IS_SHUTDOWN) > + APPEND_REASON("shutdown"); > + if (flags & CHECKPOINT_END_OF_RECOVERY) > + APPEND_REASON("end-of-recovery"); > > I still think it would be simpler to construct the checkpoint flags strin= g > with snprintf() rather than introducing a new macro. Please see > the attached patch. > > - if ($node_primary->log_contains("checkpoint complete: ", $logstart)) > + if ($node_primary->log_contains("checkpoint complete:", $logstart)) > > I don't think this change is necessary. > > I've also updated the commit message in the attached patch. Thank you very much for refining the implementation and simplifying the flag construction logic using snprintf(). I have reviewed the committed changes and verified that the formatting and behavior are consistent and correct. The updated approach is clear and aligns well with PostgreSQL coding style. I also appreciate the improvements made to the commit message as it clearly explains the motivation and makes the change easy to understand in context. I sincerely appreciate your guidance throughout this review process. Regards, Soumya