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 1qy0Tg-0054jJ-4U for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Nov 2023 01:57:04 +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 1qy0Se-005PZP-QM for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Nov 2023 01:56:00 +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.94.2) (envelope-from ) id 1qy0Se-005PZG-GE for pgsql-hackers@lists.postgresql.org; Wed, 01 Nov 2023 01:56:00 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qy0SX-003NN8-HQ for pgsql-hackers@postgresql.org; Wed, 01 Nov 2023 01:55:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=v6jao+3RYpxBKAmzGIG//0hvP7m1tcXhY4IFRo0D/oc=; b=AMA5Y mkSXNGNBW0XKvwcwLEKQA4GlAf1z4sYzPoMmsoy2t0XCghyea5VQvsxWXZSgjzPg5AA72MwhrItRX pn+/YiB4ltFJzDFqcr9osc4C5JCQxq2XnOii4AlWqXz7SDW2o6DkHcs+tq83GtumgdkOitOsC6b1b 9NPFQZ4EyHRBKF/Ug/OL3c78A2KXbnCpiGmdJL6D/5Br4uxQlDEvRF1idpRes6d5K8+s8QomDcCTX Gu5LrCHAyhRFDwzBCtmlDdhoSueo6m8hWNq8/GoAOau2H8vEX6JW7dy2eIa6w/P7E+jfJesEe6DO4 SH1oJCwojqTBCkfX6bpi/3CBw1d3g==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qy0ST-005unq-0E; Tue, 31 Oct 2023 21:55:49 -0400 Date: Tue, 31 Oct 2023 21:55:49 -0400 From: Bruce Momjian To: Tom Lane Cc: Yugo NAGATA , Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: Question about non-blocking mode in libpq Message-ID: References: <20210719231129.b2ab655c0d0e80545274c86f@sraoss.co.jp> <202107201605.b3hmz4g6uqqz@alvherre.pgsql> <20210721101509.7e70e0f801a4457a2f6a6174@sraoss.co.jp> <2604997.1698775114@sss.pgh.pa.us> <2666892.1698801066@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2666892.1698801066@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > Okay, I added "_successful_ calls", attached. I am not sure what else > > to add. > > What I'm objecting to is removal of the bit about "if they need to be > called again". That provides a hint that retry is the appropriate > response to a failure. Admittedly, it's not 100% clear, but your > version makes it 0% clear. I thought the original docs said you had to re-call on failure (it would not block but it would fail if it could not be sent), while we are now saying that it will be queued in the input buffer. Is retry really something we need to mention now? If out of memory is our only failure case now ("unable to enlarge the buffer because OOM"), is retry really a realistic option? Am I missing something? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.