Best Practise during DB env refresh (Prod to Non Prod) and Pro's and con's of using "DB level - Logon trigger"

From: Bharani SV-forum <esteembsv-forum(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "ronljohnsonjr(at)gmail(dot)com" <ronljohnsonjr(at)gmail(dot)com>, "adrian(dot)klaver(at)aklaver(dot)com" <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Bharani SV esteembsv-forum <esteembsv-forum(at)yahoo(dot)com>
Subject: Best Practise during DB env refresh (Prod to Non Prod) and Pro's and con's of using "DB level - Logon trigger"
Date: 2026-10-22 17:38:49
Message-ID: 1634079310.2426511.1792690729718@mail.yahoo.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

PostgreSQL MVP''sNeed best input/ suggestion.
We have VM based community PostgreSQL Ver 17.X (Azure RDS with flexible server), and need to know the best industry wide best practise during DB refresh/maintenance of non prod DB env's.
Various Application team will connect using different methods such as- psql- dbeaver - pgadmin- via API call- via REST API Calletcand we are planning to have DB trigger (during db logon) and the trigger as "ACTIVE" during DB refresh process.Certain DB env's (non-prod), We too dont shutdown completely or startup in "restricted mode" (if applicable) and specific DB's (excluding db name = non postgres) refreshed  .
Had written DB logon trigger and had mitigated using "event_trigger" option and had used "Raise warning" option and  had skipped session_user avoiding super db users such as azuresu,postgres, azure_pgadmin etc 
Tested with the usage of tool's such as psql, pgadmin 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 status on respective env during DB  refresh etc.
RegardsBharani 

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manuel Reyes Bravo 2026-10-22 17:52:54 Re: Best Practise during DB env refresh (Prod to Non Prod) and Pro's and con's of using "DB level - Logon trigger"
Previous Message Devrim Gunduz 2026-10-22 13:38:53 Re: cannot install PG on Oracle Linux 9