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 1tNvih-0031mt-Ua for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 15:12:16 +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 1tNvif-00Focq-Ro for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 15:12:13 +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 1tNvif-00Focf-FI for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2024 15:12:13 +0000 Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tNvib-000QHN-EY for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2024 15:12:12 +0000 Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-2a3bf796cccso2169795fac.1 for ; Wed, 18 Dec 2024 07:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734534727; x=1735139527; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=u0me+oR87hq0D0ssryOwIpFFyjH3IGWyrrJPGsSMj0g=; b=cx4emDH37hLqGwf7eUsdw0KZECVz76TScQqPN6t0uHosZlpk8vaxxFhzVMzuF4aHEd EozcJbizgm1CwpLXBAjMbt0/xk5zSQsOf4yON2uo+KrqsefLeFh7/px9Ty170KL/RkQR +5uTOJ8NnDKzeqGoEb1AVR8XN9VVYAhphBYTs5NstaXvnNuQGgSEZpIwaRw6gi56TCSn GoPss1VlSIhsdj2sJ/T19k4gLaeq0bfmHyXCCjiW8lWEmTgrXDFJWcoOzywZT2GXHVdz ScF2+r7WxKwjqEG2gt8l+VHSfuVDijMWLMN8595mHQkhMgsG2JQsAv/oa1lOLYX/5bpi 81lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734534727; x=1735139527; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=u0me+oR87hq0D0ssryOwIpFFyjH3IGWyrrJPGsSMj0g=; b=UcFeMZg7VI9NKqgzrj48upbBvJnvhxVXOQMoz+pWht/Q7Io4oXZAa/KDnCD5yDHMgh 0HupZvFCvKTKiS2rgFtsTRHiXj5s3B8TrQ4l49jL1Zn7k9V8VL6yqFGmkbYbtUz33C57 mAg07Sfik0lsc77qUDf2GfRsGv/BU5fp7TBuuidQ/0YXgyqdFcm/5WpSboxwOQKoyHjQ c0SLPv9EmtVkbTLyn/y0GTYqPqwIG6F94KIzfLR5Eyk3TqZfhJ51KOXjFihs8ASSee7G rRH2IUBzJmBP0lIuyaq+Ub1CGXgv98EsaaA05g2RD7uc4gq7MgmcaI153aw96qr/D5gQ /yKw== X-Gm-Message-State: AOJu0YzNrIYwSYvc1nIRBCUyjSx1jnkaYyWlV9GhsYGfhjAU3xqC146n bDZkSy+XEBSC/6wE4PMRqV9ipEEJPITRLwtjLYuYOgFSaKYIwqhxAB7mlP3uw/ddqUn1fRvjK3B nDxF174Xb0NDMJDXn0ab/1+dHe/4097a5 X-Gm-Gg: ASbGncsKX2ImbFBWrto/Q/5SBwa1ThRDAoDTl14jQMs17CaJyp3L3TgqcJo+0w5jbt/ J3Bd3OHHZwwMA3V7OlNSBkNYBe8cYMrUo/amYprA= X-Google-Smtp-Source: AGHT+IGwm/ytl7SCVyYVJVQ0Et03bJLRdqKFiBJM0Xh3b5X1ODQRP1E5OSuuwhIBjwWUtsUK1bjqSnUfvgWtdUa9Dt4= X-Received: by 2002:a05:6870:828d:b0:261:16da:decb with SMTP id 586e51a60fabf-2a7b307dabcmr1717711fac.11.1734534727208; Wed, 18 Dec 2024 07:12:07 -0800 (PST) MIME-Version: 1.0 References: <446423eb-4a4e-4135-bbb8-4d0e5c7aac3b@cleistech.it> In-Reply-To: <446423eb-4a4e-4135-bbb8-4d0e5c7aac3b@cleistech.it> From: Ron Johnson Date: Wed, 18 Dec 2024 10:11:54 -0500 Message-ID: Subject: Re: Intermittent errors when fetching cursor rows on PostgreSQL 16 To: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="00000000000044164e06298cd6fe" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000044164e06298cd6fe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 18, 2024 at 5:01=E2=80=AFAM Enrico Schenone wrote: > Good day. > My name is Enrico Schenone, from Genoa, Italy. > I'm a software achitect working at Cleis Tech - Genoa - Italy - > http://gruppocleis.it > Me and my team are using PostgreSQL v12 to v16 on Debian 10-12 and Ubuntu > Server 22.04 LTS with no-cluster configuration. > Our applications are developed with 4Js Genero platform (classified as > LCAP) - https://4js.com > > I whish to report an issue where I can't say if it happens at server or > client side (or both as well). > The problem occurs occasionally and only when fetching rows from a > server-side cursor. The related query may be complex with joins or very > easy (just one static table with 86 rows without WHERE conditions). > I have set the "debug5" verbosity level of PostgreSQL log and I have > extracted from millions of log line those who are belonging to separate > failing sessions/connections. > At the same time I have extracted the related application log. > For each failure reported into the client-side application log, I have a > distinct PostgreSQL detailed log. > > Then I have merged client-side end server-side logs along the timeline an= d > I have observed what client and server does. > For example (S: means PostgreSQL Server log, while C: means Client log): > Can you replicate the error in Prod using psql and cursors? See https://www.postgresql.org/docs/current/plpgsql-cursors.html#PLPGSQL-CURSOR= -USING Section 41.7.3.5. --=20 Death to , and butter sauce. Don't boil me, I'm still alive. lobster! --00000000000044164e06298cd6fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Dec 18, 2024 at 5:01=E2=80=AFAM E= nrico Schenone <eschenone@clei= stech.it> wrote:
=20 =20 =20
Good day.
My name is Enrico Schenone, from Genoa, Italy.
I'm a software achitect working at Cleis Tech - Genoa - Italy=C2=A0= - http://gruppocleis.= it
Me and my team are using PostgreSQL v12 to v16 on Debian 10-12 and Ubuntu Server 22.04 LTS with no-cluster configuration.
Our applications are developed with 4Js Genero platform (classified as LCAP) - https://4js.co= m

I whish to report an issue where I can't say if it happens at serve= r or client side (or both as well).
The problem occurs occasionally and only = when fetching rows from a server-side cursor. The related query may be complex with joins or very easy (just one static table with 86 rows without WHERE conditions).
I have set the "debug5" verbosity level of PostgreSQL l= og and I have extracted from millions of log line those who are belonging to separate failing sessions/connections.
At the same time I have extracted the related application log. For each failure reported into the client-side application log, I have a distinct PostgreSQL detailed log.

Then I have merged client-side end server-side logs along the timeline and I have observed what client and server does.
For example (S: means PostgreSQL Server log, while C: means Client log):

=
Can you replicate the error in Prod using psql and cursors?


--
Death to= <Redacted>, and butter sauce.
Don't boil me, I'm still a= live.
<Redacted> lobster!
<= /div> --00000000000044164e06298cd6fe--