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.94.2) (envelope-from ) id 1su338-003gyw-SD for pgsql-committers@arkaria.postgresql.org; Fri, 27 Sep 2024 04:57:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1su338-002x1x-6L for pgsql-committers@arkaria.postgresql.org; Fri, 27 Sep 2024 04:57:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su337-002x1c-VQ for pgsql-committers@lists.postgresql.org; Fri, 27 Sep 2024 04:57:49 +0000 Received: from fhigh-a1-smtp.messagingengine.com ([103.168.172.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1su334-001ImD-DE for pgsql-committers@lists.postgresql.org; Fri, 27 Sep 2024 04:57:49 +0000 Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.phl.internal (Postfix) with ESMTP id 9C78D1140227; Fri, 27 Sep 2024 00:57:46 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Fri, 27 Sep 2024 00:57:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1727413066; x=1727499466; bh=z3aLyZ9tN2 He7LeovIB9rPhZrz3J/Kp3v3EC08RLMr4=; b=anj61hWDGDaHs9XcE88DcfpLc0 rTn7iSTLsomaeie13BNUOCSXPc2Wneh8d/CCVJr2jo4XmSX7qXbEbWIHsa50Sy19 I7SG41V8Qt7pvH7opbg4T4/gseAYLOX8chtJCcKjwfJBC/Ws2XKig5YO6y4LvSXf UvUjptsle9/5uafelt1v4JZmsM7o+fsisVFjdFmeUV4fBsSdwPWbJTX1WJeU5IEp i7zzNyfYNunKfXyE6UYmL2ZTkBhWOCAKKi9Yv9O0ElUN3xbCpQ1LkWHU0uYruBdA HyXjLbkAQKNIp7Gpuk4Wz++Uo876R8N7J9vFIlH5ZWey6iX69hucDb1EaLUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1727413066; x=1727499466; bh=z3aLyZ9tN2He7LeovIB9rPhZrz3J /Kp3v3EC08RLMr4=; b=pjFfaUfWzIhPIOwrAs+Vmzt+iUBuVNuwMGY6vx2DRCLF VJwB8DAWJFhVwgTzU1HENmtm5MX/WCeJnLy+6TKvZta3KQKWvqCblKNqWdHuKjPB Vsj2YpjRC/G/b/WrVJs78/c0u1zO7l5Ts9mCNRVrJn7Va8Sgs8wnH5/PeQ1UKag4 qF0Q4R1SWilSO+bKMTuOE/SunwK9bOADKb9+xHSXN8ah5FxGsu2cCGIRZunvziFj gMzicHndCpvRyqHqtiMmrUS3UpQKWf8a68Ccd+Xk/sPvlRxGuKDKh/VMkf0jVe5x apuYP8Sc1imRwlKdSHZ4847DUZgxsDaKc/hEQRgk8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddtkedgkeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteel ieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheprggvkhhorhhothhkohhvsehgmhgrihhlrdgtohhmpdhrtghpthht ohepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhrtghpthhtoheprghkohhroh htkhhovhesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepphhgshhqlhdqtgho mhhmihhtthgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Sep 2024 00:57:37 -0400 (EDT) Date: Fri, 27 Sep 2024 13:57:23 +0900 From: Michael Paquier To: Alexander Korotkov Cc: Peter Eisentraut , Alexander Korotkov , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Implement pg_wal_replay_wait() stored procedure Message-ID: References: <18c0fa64-0475-415e-a1bd-665d922c5201@eisentraut.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FgxonubnK4YAziDJ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --FgxonubnK4YAziDJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 27, 2024 at 01:35:23PM +0900, Michael Paquier wrote: > I would suggest to keep things simple and have one single function > rather than introduce two more pg_proc entries with slight differences > in their error reporting, making the original function return a text > about the reason of the failure when waiting (be it a timeout, > success, promotion or outside recovery). More to the point here. I am not sure what's the benefit of having a procedure, while we have been using SQL functions for similar purposes in xlogfuncs.c for years. And what you have here can also be coupled with more complex logic in SQL queries. -- Michael --FgxonubnK4YAziDJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmb2OzMACgkQnvQgOdby QH3dZg/8Cdxshlh+JAsKhBk7iG9zups4cU51sVOfLktzmQXj/OyYwLje7GKyJsxm zaDL40JW/ws1WTH2ovkb2cLMVQE34HqO8PWvGb3sn/QErtgakwFOcoLkZZQbpaIX jhupQnadlan7D2VSgkgBSwPKeCKyZzrkgXUsIwV7pkAZF0bun09+RbyOAsmZjv4o vtwoFFqemUJ0OXxHEh8XENUg4w83RDs5eaPSm62Nr05ei/q5BYqiAniRvu4fcIM6 6tuQ5GwJQw7DWuQzrhwCvZvXkEgstSk757bD0VUP3aTEOBcbEy3wkmuOXC9Ssh12 Ls9AQvkMg0ofjr6puqT0XFUSJRExIjEqvb+q0tbIprCK405HNT5gEtU/pj0s5ngG E7Qb8kVuhbqe7KELXTevi8MqyAyXSanZXaId1/ZkXB7iBkTuRcYmKoAjgXaYKRYl 9mOzorJRk8zAQkh6RuoCtQ3+GS5hi3R7T+O7CY2w5MRHAOwdzOWCGI9bIxGB45+G uJ6pxJdfGCa9LYxKC69S7h9JgExQTHoJWecUHkHLvgZb8OXFC7Do/e87Ffm3v5vR CSEcj/mIQKVGsAY7QGWO/Xd2af/sUAokxG5CDl2a92WwkmzOnoPOpmOfhrhFL7ts sXODMZbdCCSTBmySOCDZNh4nFmq9K61yrN5Da/qj5Q/MwrSQ0ag= =rdRl -----END PGP SIGNATURE----- --FgxonubnK4YAziDJ--