Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj2h1-0005Zw-T2 for pgsql-general@arkaria.postgresql.org; Fri, 05 Nov 2021 17:07:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mj2h0-0007qt-S9 for pgsql-general@arkaria.postgresql.org; Fri, 05 Nov 2021 17:07:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj2h0-0007qj-Gj for pgsql-general@lists.postgresql.org; Fri, 05 Nov 2021 17:07:54 +0000 Received: from sonic313-20.consmr.mail.gq1.yahoo.com ([98.137.65.83]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mj2gw-0006RN-MP for pgsql-general@lists.postgresql.org; Fri, 05 Nov 2021 17:07:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636132066; bh=cuYKAKxwtpsJgFkNQq4h+V7yQauQoO7ctuC9uE/OOvg=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=rg5AvcwIL3GOTQGrpCOS9BmWgXCXT+UFhxDEDpOcBjjzz/LxmcY7/7/eh148XlTTH0hd792AP7Xvsozfkh2Kxzuc73jg+hCNp6QR7eVTzw+X/+IEZtEWSzUrgOlztDdGfikU/KfcPy7TxhJwRKKCu8X2oqVMSg/KlLghU0i02xCN/O9f8evNT1LKqSXlbZrgOui5QnsA3Ou8u6V1rEWgAwVFBZagDlEfLSwJgJABMs5SSoLaMdLIZdYEGp2VpX9J4aCEHfr5r9nwfcD+MvYLJFk28JQWZ13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h 3zm4Mh_76peH1yF4nbkKOdpOXI9QrZIGqnwSlP6ocb9qNxnYDdPd6HfiVUiqRBsOrwXEpYrmo4E4 AgCQXBwKBy42n5q_.9aUAKo1fyl.kypKS.EYGyYCWYYufMOlM.7o7DVPaS13Cg.c0ZiRz1DIoUoT m7CNb6XZzPCLjp.6Nomc9Y.s_j.Tt_QA5WjNT5xCSOGae5HhndAtY7hEtWtxI7C.RgqN3hmzWOTA eJQCb7vOspAF73sGQDO2SwbZq6VrNd.trYFTH0iHFxaqhkfWU8oaCzqF8LFxPB._5RVnk_JiPJfv ehmDFzttvBw8IT0BB9t9Eax5wBwopVOtRaPFKoR04lD_pt3w0zzt62YbKhFkmUC_duIMj0ZzghhL WaYAGhq0VKjlLmF5VVEKbgmM8_o26C3QcgkXUeC0vDeb72vJ46iKjasWyn_5XtIPSRLlHwFiePD9 blgtQ2gDBA56OsQW1ux4NJMBqUVcRfCs_yG0QjgfaTgWDPb2S6h8neYBlBxAXTvQ2h0FkfuvG2VG kgM86tn_muyvG_2cgctMLovXasu_GGyi9rv1bZDt0V32EjP4rUhmlr9aFWZ1BzE0BB5WNvrC2AWM OeyyoCvGguL9cdKWTdhjiq2w4RQ9EleslaeZcne6eCddTERxbvAi7iPdHt6wXvh9KYcIbNHhEHLO eWPK9lKn39by29l5Hs1IzW8ZS2NJgZcBStMcCtKp_C.LTcaNUAkp5N26c6znJazSNCZxjDf5MtrG sIv7BqdRPL5.x X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 5 Nov 2021 17:07:46 +0000 Date: Fri, 5 Nov 2021 17:07:44 +0000 (UTC) From: Boboc Cristi Reply-To: Boboc Cristi To: Michael Lewis , Vijaykumar Jain Cc: Tom Lane , PostgreSQL General , "pgsql-general-owner@lists.postgresql.org" Message-ID: <1008215115.908996.1636132064538@mail.yahoo.com> In-Reply-To: References: <1395901381.802146.1636111701121.ref@mail.yahoo.com> <1395901381.802146.1636111701121@mail.yahoo.com> <412962.1636120304@sss.pgh.pa.us> Subject: Re: Debugging features needed MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_908995_1580518466.1636132064537" X-Mailer: WebService/1.1.19266 YMailNorrin Content-Length: 6419 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_908995_1580518466.1636132064537 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =C2=A0 =C2=A0 You are right, it is too much work to do. For the moment appl= ication_name will suffice! Best regards, Cristi Boboc=20 On Friday, November 5, 2021, 06:15:53 PM GMT+2, Vijaykumar Jain wrote: =20 =20 =20 On Fri, Nov 5, 2021, 7:46 PM Michael Lewis wrote: For my purposes, app name isn't long enough so we put a comment at the star= t of every SQL that has a unique ID generated in the application. This ensu= res that we can tell one connection apart from another even when both are c= oming from the same feature/action (applicationName is set to this) even us= ing connection pooling. Before, we had different requests reusing the same = pid of course and if they happened to have the same appName, we didn't know= it was a new process on app side. While researching options,=C2=A0 I did see crunchy proxy using annotations = to split read/write. But I was not sure if any of these options fit well wi= th multiple toolings , drivers etc.=C2=A0 https://github.com/CrunchyData/crunchy-proxy/blob/master/docs/crunchy-proxy= -user-guide.asciidoc#annotations The other option washttps://github.com/wgliang/pgproxy or writing your custom plug-in for envoyproxy filter for postgresql=C2=A0 https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/other_proto= cols/postgres So basically it was adding one more layer in between the already connection= pooling layers via pgbouncer.The biggest concern is when we use ssl, these= session params cannot be read unless we terminate ssl at the proxy, and th= en decode,=C2=A0 so I gave up :) =20 ------=_Part_908995_1580518466.1636132064537 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
    You are right, it is too much = work to do. For the moment application_name will suffice!
Best regards, Cristi Boboc
<= /div>


=20
=20
On Friday, November 5, 2021, 06:15:53 PM GMT+2, Vijayku= mar Jain <vijaykumarjain.github@gmail.com> wrote:




On Fri, Nov 5, 2021, 7:46 PM Michael Lewis <m= lewis@entrata.com> wrote:
For my= purposes, app name isn't long enough so we put a comment at the start of e= very SQL that has a unique ID generated in the application. This ensures th= at we can tell one connection apart from another even when both are coming = from the same feature/action (applicationName is set to this) even using co= nnection pooling. Before, we had different requests reusing the same pid of= course and if they happened to have the same appName, we didn't know it wa= s a new process on app side.
=

While researchi= ng options,  I did see crunchy proxy using annotations to split read/w= rite. But I was not sure if any of these options fit well with multiple too= lings , drivers etc. 
<= a shape=3D"rect" href=3D"https://github.com/CrunchyData/crunchy-proxy/blob/= master/docs/crunchy-proxy-user-guide.asciidoc#annotations" rel=3D"nofollow"= target=3D"_blank">https://github.com/CrunchyData/crunchy-proxy/blob/master= /docs/crunchy-proxy-user-guide.asciidoc#annotations

The other option was
https://github.com/wgliang/pgproxy

or writing your custom plug-= in for envoyproxy filter for postgresql 

=

So ba= sically it was adding one more layer in between the already connection pool= ing layers via pgbouncer.
The biggest concern is when we use ssl,= these session params cannot be read unless we terminate ssl at the proxy, = and then decode,  so I gave up :)

------=_Part_908995_1580518466.1636132064537--