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 1vL2d2-001bCO-1L for pgsql-odbc@arkaria.postgresql.org; Mon, 17 Nov 2025 17:03:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vL2c0-0013gD-2z for pgsql-odbc@arkaria.postgresql.org; Mon, 17 Nov 2025 17:01:57 +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.96) (envelope-from ) id 1vL2c0-0013g5-22 for pgsql-odbc@lists.postgresql.org; Mon, 17 Nov 2025 17:01:57 +0000 Received: from pgintl.fastcrypt.com ([149.56.129.164]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vL2by-0001rd-12 for pgsql-odbc@postgresql.org; Mon, 17 Nov 2025 17:01:56 +0000 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by pgintl.fastcrypt.com (Postfix) with ESMTPSA id 08686201DB for ; Mon, 17 Nov 2025 12:01:51 -0500 (EST) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b7379641791so356747066b.2 for ; Mon, 17 Nov 2025 09:01:51 -0800 (PST) X-Gm-Message-State: AOJu0YyK68pXZZkXicpbcgdiXQLMEuZWXfVuFbs+Xob0nPXw87Q4zJKD bCjnErJWYt8DkCTRzb1p7sxmdEOZCgfgacFxjpVcrE8+Ky2iiJ+aeWHZsHvYtm1bEeH9VuX9Wa0 JfcwpD7Iq2syQVTKMDHs1IQkdovwTUh0= X-Google-Smtp-Source: AGHT+IGnNi/cRnCmt/oCbkajZcs9JNhmIALLY+Owb6VbymJMFiR0xL5dGgi/dlYyMh+XVqM0QNjJfssa56QoPl2+lXI= X-Received: by 2002:a17:907:3f9b:b0:b73:79e9:7d40 with SMTP id a640c23a62f3a-b7379e982b1mr1005560366b.54.1763398910632; Mon, 17 Nov 2025 09:01:50 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Dave Cramer Date: Mon, 17 Nov 2025 12:01:33 -0500 X-Gmail-Original-Message-ID: X-Gm-Features: AWmQ_bkPfIZczquNQxNlgr86xlV-QDoZ-cmt5WfjvEltYHsFcQsOTOfxASX50gc Message-ID: Subject: Re: Guidance on avoiding session pinning with psqlODBC and RDS Proxy To: Neeta Ghadge Cc: "pgsql-odbc@postgresql.org" Content-Type: multipart/alternative; boundary="000000000000aa6b430643cd4dc3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000aa6b430643cd4dc3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, OK, I will have to change the driver. I think that is doable. Can you create an issue here https://github.com/postgresql-interfaces/psqlodbc Dave Cramer www.postgres.rocks On Mon, 17 Nov 2025 at 11:52, Neeta Ghadge wrote: > Hi, > Thank you for your prompt response. > It=E2=80=99s not SHOW command, rather it is *SET* that is causing session > pinning. I will try to find alternate approaches to avoid session pinning= . > > > > > > *Thanks and Regards,* > > *Neeta Ghadge* > > > > *From:* Dave Cramer > *Sent:* Monday, November 17, 2025 10:14 PM > *To:* Neeta Ghadge > *Cc:* pgsql-odbc@postgresql.org > *Subject:* Re: Guidance on avoiding session pinning with psqlODBC and RDS > Proxy > > > > You don't often get email from davecramer@postgres.rocks. Learn why this > is important > > *CAUTION:* This email is from an external source. Please don=E2=80=99t op= en any > unknown links or attachments. > > Hi, > > > > Neeta, > > > > Talking to some folks at Amazon, they don't think it should pin. Can you > open a ticket with them? > > > > Dave Cramer > > www.postgres.rocks > > > > > > On Mon, 17 Nov 2025 at 11:21, Dave Cramer > wrote: > > Hi Neeta, > > > > I'm curious why RDSProxy is pinning on this. I can't think of any reason > to pin on a SHOW > > That said, I'm equally curious why psqlODBC is doing it, it doesn't reall= y > need to know the transaction isolation level > > > > Dave Cramer > > www.postgres.rocks > > > > > > On Mon, 17 Nov 2025 at 05:19, Neeta Ghadge > wrote: > > Hi, > We are currently using PostgreSQL 16.5 with the ODBC driver (psqlodbcw.so > version 17.00.0006) in an environment that relies on Amazon RDS Proxy. > > We have observed that the driver automatically issues the following SQL > statements at connection startup: > > *SET DateStyle =3D 'ISO';* > > *SET extra_float_digits =3D 2;* > > *SHOW transaction_isolation;* > > > > While harmless in most cases*, these queries cause AWS RDS Proxy to pin > sessions, which reduces pooling efficiency.* We can neutralize the SET > commands using RDS Proxy=E2=80=99s InitQuery feature, but SHOW > transaction_isolation still forces pinning. > > > > Could you please suggest recommended ways to handle this scenario when > using psqlODBC with RDS Proxy? Specifically, are there configuration > options or best practices to avoid or minimize session pinning while stil= l > maintaining ODBC compliance? > > > > Thank you for your guidance. > > > > > > *Thanks and Regards,* > > *Neeta Ghadge* > > > > This message and the information contained herein is proprietary and > confidential and subject to the Amdocs policy statement, you may review a= t > https://www.amdocs.com/about/email-disclaimer > > Amdocs Development Centre India Private Limited having CIN: > U72200PN2004PTC0188320 converted into Amdocs Development Centre India LLP > (A limited liability partner=C2=ADship with LLP Identification Number: > AAI-6901 effective 28th Feb 2017) > > This message and the information contained herein is proprietary and > confidential and subject to the Amdocs policy statement, you may review a= t > https://www.amdocs.com/about/email-disclaimer > > Amdocs Development Centre India Private Limited having CIN: > U72200PN2004PTC0188320 converted into Amdocs Development Centre India LLP > (A limited liability partner=C2=ADship with LLP Identification Number: > AAI-6901 effective 28th Feb 2017) > --000000000000aa6b430643cd4dc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah,

OK, I w= ill have to change the driver. I think that is doable.=C2=A0

=
Can you create an issue here=C2=A0https://github.com/postgresql-interfaces/ps= qlodbc

Dave Cramer
www.postgres.rocks


On Mon, 17 Nov 2025 at 11:52, Neeta Gha= dge <Neeta.Ghadge@amdocs.com<= /a>> wrote:
<= div class=3D"msg-2089936922208053668">

Hi,
Thank you for your prompt response.
It=E2=80=99s not SHOW command, rather it is SET that is causing sess= ion pinning. I will try to find alternate approaches to avoid session pinni= ng.

=C2=A0

=C2=A0

Thanks and Regards,

Neeta Ghadge<= span style=3D"font-size:11pt;color:rgb(14,40,65)">

=C2=A0

=C2=A0

CAUTION: This email is from an external source. Please don=E2=80=99t open any unknown links or at= tachments.

Hi,

=C2=A0

Neeta,

=C2=A0

Talking to some folks at Amazon, they don't thin= k it should pin. Can you open a ticket with them?

=C2=A0

Dave Cramer

=C2=A0

=C2=A0

On Mon, 17 Nov 2025 at 11:21, Dave Cramer <davecramer@postgre= s.rocks> wrote:

Hi Neeta,

=C2=A0

I'm curious why RDSProxy is pinning on this. I c= an't think of any reason to pin on a SHOW

That said, I'm equally curious why psqlODBC is d= oing it, it doesn't really need to know the transaction isolation level=

=C2=A0

Dave Cramer

=C2=A0

=C2=A0

On Mon, 17 Nov 2025 at 05:19, Neeta Ghadge <Neeta.Ghadge@amdocs= .com> wrote:

Hi,
We are currently using PostgreSQL 16.5 with the ODBC driver (psqlodbcw.so v= ersion 17.00.0006) in an environment that relies on Amazon RDS Proxy.

We have observed that the driver automaticall= y issues the following SQL statements at connection startup:<= u>

SET DateStyle =3D 'ISO';

SET extra_float_digits =3D 2;

SHOW transaction_isolation;<= /u>

=C2=A0

While harmless in most cases, these querie= s cause AWS RDS Proxy to pin sessions, which reduces pooling efficiency. We can neutralize the SET commands using RDS Proxy=E2=80= =99s InitQuery feature, but SHOW transaction_isolation still forces pinning= .

=C2=A0

Could you please suggest recommended ways to = handle this scenario when using psqlODBC with RDS Proxy? Specifically, are there configuration options or best practices to avoid o= r minimize session pinning while still maintaining ODBC compliance?<= u>

=C2=A0

Thank you for your guidance.=

=C2=A0

=C2=A0=

Thanks and Regards,

Neeta Ghadge<= u>

=C2=A0

This message and the = information contained herein is proprietary and confidential and subject to= the Amdocs policy statement, you may review at https://www.amdocs.com/about/email-disclaimer

Amdocs Development Ce= ntre India Private Limited having CIN: U72200PN2004PTC0188320 converted int= o Amdocs Development Centre India LLP (A limited liability partner=C2=ADship with=C2=A0LLP Identification Number: AAI-6901 effective 28th F= eb 2017)

This message and the = information contained herein is proprietary and confidential and subject to= the Amdocs policy statement, you may review at https://www.amdocs.com/abo= ut/email-disclaimer

Amdocs Development Ce= ntre India Private Limited having CIN: U72200PN2004PTC0188320 converted int= o Amdocs Development Centre India LLP (A limited liability partner=C2=ADshi= p with=C2=A0LLP Identification Number: AAI-6901 effective 28th Feb 2017)

--000000000000aa6b430643cd4dc3--