public inbox for [email protected]  
help / color / mirror / Atom feed
From: Y_Bharani_mbsv <[email protected]>
To: pgsql-general <[email protected]>
To: Ron Johnson <[email protected]>
Subject: Re: any tips to have restricted inbound and getting connected with postgresql dB
Date: Fri, 20 Dec 2024 22:49:35 +0000 (UTC)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CANzqJaB6-FakfpM8tXJ_11gvTo65ep8M-oS4GSC1XxfBPPBZHg@mail.gmail.com>
References: <[email protected]>
	<CANzqJaAda4nZbkG=c+72ry5GdaxrJ6Jzr6fz1quhq8tTfaX1Pg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CANzqJaC1Uk4H=55vV_jbFYMuD1f9Bb_4Y9WKvkZA3bt92bEUnw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CANzqJaB6-FakfpM8tXJ_11gvTo65ep8M-oS4GSC1XxfBPPBZHg@mail.gmail.com>

 TQ
    On Friday, December 20, 2024 at 03:26:30 PM EST, Ron Johnson <[email protected]> wrote:  
 
 On Fri, Dec 20, 2024 at 2:25 PM Y_Bharani_mbsv <[email protected]> wrote:
  TeamI have the need to have postgresql db running in multiuser mode and do my needed tasks for few mins.
How to restrict all the application layer , not to get connected with the postgres db ,during my specific time window

1. Create a pg_hba_maintmode.conf with only the relevant hosts in it.2. Copy pg_hba.conf to pg_hba_multi.conf.3. Copy pg_hba_maintmode.conf to pg_hba.conf.4. pg_ctl reload.5. Use pg_stat_activity and pg_cancel_backend() to kill the application connections.6. Do your work.7. Copy pg_hba_multi.conf to pg_hba.conf.8. pg_ctl reload
Or... just shut down the user application.
-- 
Death to <Redacted>, and butter sauce.Don't boil me, I'm still alive.
<Redacted> lobster!  

view thread (61+ messages)  latest in thread

reply

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: any tips to have restricted inbound and getting connected with postgresql dB
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox