From: Bharani SV-forum <esteembsv-forum@yahoo.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
To: ronljohnsonjr@gmail.com <ronljohnsonjr@gmail.com>
To: adrian.klaver@aklaver.com <adrian.klaver@aklaver.com>
Cc: Bharani SV esteembsv-forum <esteembsv-forum@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"
Date: Thu, 22 Oct 2026 17:38:49 +0000 (UTC)
Message-ID: <1634079310.2426511.1792690729718@mail.yahoo.com> (raw)
References: <1634079310.2426511.1792690729718.ref@mail.yahoo.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: esteembsv-forum@yahoo.com, ronljohnsonjr@gmail.com, adrian.klaver@aklaver.com
Subject: Re: Best Practise during DB env refresh (Prod to Non Prod) and Pro's and con's of using "DB level - Logon trigger"
In-Reply-To: <1634079310.2426511.1792690729718@mail.yahoo.com>
References: <1634079310.2426511.1792690729718.ref@mail.yahoo.com> <1634079310.2426511.1792690729718@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox