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 1rkMLC-00C9Wy-U1 for pgsql-odbc@arkaria.postgresql.org; Wed, 13 Mar 2024 11:00:11 +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 1rkML9-000adS-Gs for pgsql-odbc@arkaria.postgresql.org; Wed, 13 Mar 2024 11:00:08 +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 1rk8Mk-001hSU-BY for pgsql-odbc@lists.postgresql.org; Tue, 12 Mar 2024 20:04:50 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rk8Mi-004Aat-8T for pgsql-odbc@postgresql.org; Tue, 12 Mar 2024 20:04:50 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a45c006ab82so46128366b.3 for ; Tue, 12 Mar 2024 13:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710273887; x=1710878687; darn=postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=A/YhQKDS9bD4DUqWkuzCrPWdz/aBQAjEGa+wqgbf1w4=; b=LddJUtgfX05FJ4NuY2LDtVgZR8aO2g4cUED5sAXrNenEvp7vAhGvrzNv+Q8PHsPfVd lMwZJq5jhz+Wt3C+xrH8YMCg/yEUbhBBNZ2N8IAekqC17fE55eteVZLsQZ2q1FA0Bpjb TBdYvQ+ZRTQSsdvHB7Si/oUirAMNrluAeR4mf5wuZfFpzTPAy0q41bAdOWENLJasS67Y ns0PhWkHTta0bhkBMG+3kbik3OWUCGnoRgkxIcQrvgBlgG9bU/pzjV+jDUmBPGM1CZwW AfdawQSG8VMQmwzpyVEEZwdbR4YIUjKQn1jp9TPD36DTWlNGwPnx5hL3RBZ2mJsP4DB1 HtGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710273887; x=1710878687; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=A/YhQKDS9bD4DUqWkuzCrPWdz/aBQAjEGa+wqgbf1w4=; b=acAV9JOw+35gbn9SEyS8NkOhaBwXc/8qe2ybqJotfhswQu1sdwwJ4VjI1VfP6E0wKI aFbtZZcdvxcqtcp9fWUc5/vNiBWFBOErQv+vHHh/uYw8KWCGbuBUMEsw29N6aNTAJBGi YHFScpVq8J35PdCD23WzXPICKQNUvJ8aDYRqRWlhhd4DenhbKTuppyXz7Myv16Oqbz1B M4ryyzvimXFRlGH2bvXmgEDWgUFgb12zZi0U+d3H0lNCTd2OY5l6aOdzVqHDisoj4Ef5 9gi4PlKOs6nH11T6EsmFlzRbNAjcxtzn1IGnmJRWFyOE0WBDz6T82haIB+IXMDX3G7sP RWjw== X-Gm-Message-State: AOJu0Yzkhk/fCz6a2yHqix3i8PjjjubIILGHkX0Szn2NGm0GGmicsBuv P0e2/f/1HBsQb5eARW2Hlb1LbVjxdkQOh/O2aHvS8UUuGJhf/VFkAy4F3GM7QyRP2z+CVowfRzR N5icBdWkAj1Cr9VcjZn7AkY9WsCW/VpcGXbk= X-Google-Smtp-Source: AGHT+IFvYvyCGkasv97alGXRaLFIXatfLOpVfTpch1ix4gPyb/QjRL93SI+CwCwkHfZlj9ehUl1SiLgjQHTNxJuHKPA= X-Received: by 2002:a17:906:6442:b0:a45:a7e5:fb98 with SMTP id l2-20020a170906644200b00a45a7e5fb98mr3366944ejn.27.1710273886705; Tue, 12 Mar 2024 13:04:46 -0700 (PDT) MIME-Version: 1.0 From: Winner Lohas Date: Wed, 13 Mar 2024 05:04:35 +0900 Message-ID: Subject: Does ODBC driver connection pooling have a bug? To: pgsql-odbc@postgresql.org Content-Type: multipart/alternative; boundary="0000000000007c5dfd06137c2b52" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000007c5dfd06137c2b52 Content-Type: text/plain; charset="UTF-8" Hello. I was using the ODBC driver and found that the problem occurred in a temporary table. However, when I worked with C# with Npgsql (PostgreSQL .NET driver), there were no problems even though connection pooling was working. When a connection is reused internally, DISCARD ALL is done first. So the temporary table is also automatically dropped. I also tested MySQL, and the MySQL ODBC driver worked without problem. However, looking at the network protocol, it seems like the authentication process is almost done again rather than a connection reset. The process took quite a long time because it seemed that only the TCP connection was being reused rather than FIN. What's interesting is that the ODBC data source manager is installed with pooling turned off by default. The default setting of MS SQL Server's ODBC driver is to use pooling, and it works well with or without pooling. Internally, sp_reset_connection is executed to initialize reused connections. Regards. Wooseung Kim --0000000000007c5dfd06137c2b52 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

I wa= s using the ODBC driver and found that the problem occurred in a temporary = table.

However, when I worked with C# with Npgsql = (PostgreSQL .NET driver), there were no problems even though connection poo= ling was working. When a connection is reused internally, DISCARD ALL is do= ne first. So the temporary table is also automatically dropped.
<= br>
I also tested MySQL, and the MySQL ODBC driver worked without= problem. However, looking at the network protocol, it seems like the authe= ntication process is almost done again rather than a connection reset. The = process took quite a long time because it seemed that only the TCP connecti= on was being reused rather than FIN. What's interesting is that the ODB= C data source manager is installed with pooling turned off by default.

The default setting of MS SQL Server's ODBC driver= is to use pooling, and it works well with or without pooling. Internally, = sp_reset_connection is executed to initialize reused connections.

Re= gards.
Wooseung Kim
--0000000000007c5dfd06137c2b52--