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.98.2) (envelope-from ) id 1xJwkn-00000000WkT-0yvR for pgsql-general@arkaria.postgresql.org; Thu, 22 Oct 2026 17:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xJwkm-0000000CkgU-36sg for pgsql-general@arkaria.postgresql.org; Thu, 22 Oct 2026 17:39: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.98.2) (envelope-from ) id 1xJwkl-0000000CkgL-2xGS for pgsql-general@lists.postgresql.org; Thu, 22 Oct 2026 17:39:00 +0000 Received: from sonic305-21.consmr.mail.ne1.yahoo.com ([66.163.185.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1xJwkj-00000000RNG-0gnZ for pgsql-general@postgresql.org; Thu, 22 Oct 2026 17:38:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1792690734; bh=rghyV7oOQtOJGqrNAgVDph3ZlISiazmbs6SYOYPGjUY=; h=Date:From:To:Cc:References:Subject:From:Subject:Reply-To; b=LhouUNkhAxRk1GFsUKPwjuKbG+M4zX9dUNIuCdOzcQDPSxzO00iNfbmB1E5lM1bRUQ9WKid6EruO+H0BhkUr7c/VXRV7orxRl+p7UBQxgU6C+B52M/fMP+kRWqGRujQLGou9Om4jesjcHWnM8hdfvP7Qlvj6FfdoSYipeehdAzCUoRULQTI94vFzuSAgC2XuyLA6jHRcTwYHr8+YeGMkgt93yNtdywULCqqBHz+pfTJJnQtXRcwQeA7LtJ3N2UR14ikA2R22utC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NDauHzcT9Y4Dp_yBIBMzsdF dB4lwoWgV9DePwbRlh1KA.pruNork6pb31V0hA89VtRmP.6WY6cHIaeFHVtbJSh40NUhbC7yAnSz hxCTdJZGPjlikhL9GDdMKoR.TF_CZIZ.mW9yZPqOLgEEPppWURgO3tuxdtv2n6E5NCc9Bjjlp93_ 8XSz1frJCNwcZGusQ.nVJdxLWfa7OBABD_IhFt_OamBQ_OWS_RnKJDTIUZDP5HkTPqGGX1KcGvH0 dJl_U4dNQUMZX3n1yD.lFwf_obHC8yzJlOrc7kGSTM7cEc9d6H4F8dX63k6kPOBCwTcJVsAwcB7e HYQVomor6gCyIT9A2obyV3sHIItULJvsxXiz93eKJHoBz0P_u4nOztnM.x8d1mmcEw2GKFAw.NoS r1siLwXr.Ne0VCjbyBugcqUnCxhOEoY0PIbqUUHT6u5uVkg6ScHG2z3eiwwKsEi2g.eIykp07ntZ WJTjaHxQGHYBGAasYCM.Bwc0jj1NinYx7uk0fQtppIhLsb_QG6mcoKTHDAJDIjjHAmFmfkNNdyr7 cw3dmk_nnSgnfqaj4Fq1WxIve30Nf8npVUyudyU2Ych.m3w.WLPmpBZfpNVKzPm5w1DTeOdxfhSu qZIgzimcZpbAOqZQpTtq4GEWycPMiwz88DgbhFtMlYYiHQpV2c.YFGJVwCVFh_F1P.nd3FgKcpMi 6KXtjyQNj9F6zUEE8I7ZIS0Zq6uOlElytJZNwQYByyHgWmUQPjsVRIrxXw4LFt4s3fCYuOGHd.zA eqCg- X-Sonic-MF: X-Sonic-ID: f835de1e-d5fb-45e3-b7ee-1f2f016073a3 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Thu, 22 Oct 2026 17:38:54 +0000 Date: Thu, 22 Oct 2026 17:38:49 +0000 (UTC) From: Bharani SV-forum To: "pgsql-general@postgresql.org" , "ronljohnsonjr@gmail.com" , "adrian.klaver@aklaver.com" Cc: Bharani SV esteembsv-forum Message-ID: <1634079310.2426511.1792690729718@mail.yahoo.com> References: <1634079310.2426511.1792690729718.ref@mail.yahoo.com> Subject: Best Practise during DB env refresh (Prod to Non Prod) and Pro's and con's of using "DB level - Logon trigger" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2426508_1064068219.1792690729717" X-Mailer: WebService/1.1.26740 YMailNovation Content-Length: 3635 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_2426508_1064068219.1792690729717 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable PostgreSQL MVP''sNeed best input/ suggestion. We have VM based community PostgreSQL Ver 17.X (Azure RDS with flexible ser= ver), and need to know the best industry wide best practise during DB refre= sh/maintenance of non prod DB env's. Various Application team will connect using different methods such as- psql= - dbeaver=C2=A0- pgadmin- via API call- via REST API Calletcand we are plan= ning to have DB trigger (during db logon) and the trigger as "ACTIVE" durin= g DB refresh process.Certain DB env's (non-prod), We too dont shutdown comp= letely or startup in "restricted mode" (if applicable) and specific DB's (e= xcluding db name =3D non postgres) refreshed=C2=A0 . Had written DB logon trigger and had mitigated using "event_trigger" option= and had used "Raise warning" option and=C2=A0 had skipped session_user avo= iding super db users such as azuresu,postgres, azure_pgadmin etc=C2=A0 Tested with the usage of tool's such as psql, pgadmin etc it worked correct= ly and had provided "shout out alerts" Does it work effectively (100%) and provide an shoutout to API Call's (API = and REST API calls), dbeaver or any other GUI tools ? We too plan to have .html web page to provide the status on respective env = during DB=C2=A0 refresh etc. RegardsBharani=C2=A0 ------=_Part_2426508_1064068219.1792690729717 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
PostgreSQL MVP''s
Ne= ed best input/ suggestion.

We have VM based community PostgreSQL Ver 17.X (Azure RDS with f= lexible server), and need to know the best industry wide best practise duri= ng DB refresh/maintenance of non prod DB env's.

Va= rious Application team will connect using different methods such as
- psql
- dbeaver 
- pgadmin
- via API= call
- via REST API Call
etc
and we are plan= ning to have DB trigger (during db logon) and the trigger as "ACTIVE" durin= g DB refresh process.
Certain D= B env's (non-prod), We too dont shutdown completely or startup in "restrict= ed mode" (if applicable) and specific DB's (excluding db name =3D non postg= res) refreshed  .

Had written DB logon trigger and had mitigated using "event_trigger"= option and had used "Raise warning" option and  had skipped session_u= ser avoiding super db users such as azuresu,postgres, azure_pgadmin etc&nbs= p;

Tested with the usage of tool's such as psql, p= gadmin etc it worked correctly and had provided "shout out alerts"

Does it work effectively (100%) and provide an shoutout to= API Call's (API and REST API calls), dbeaver or any other GUI tools ?

We too plan to have .html web page to provide the stat= us on respective env during DB  refresh etc.

Regards
Bharani 
------=_Part_2426508_1064068219.1792690729717--