Re: Lock out PostgreSQL users for maintenance - Mailing list pgsql-general

From Boszormenyi Zoltan
Subject Re: Lock out PostgreSQL users for maintenance
Date
Msg-id 4FAE5020.2040508@cybertec.at
Whole thread Raw
In response to Lock out PostgreSQL users for maintenance  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
2012-05-12 06:29 keltezéssel, Alexander Farber írta:
> Or should I edit pg_hba.conf and restart the process?

host    all    postgres    127.0.0.1/32    md5
host    all    all         0.0.0.0/0        reject

Only postgres user is allowed to connect. You don't need
to restart the server, one of these would do:

killall -HUP postmaster
or
SELECT pg_reload_conf();

To kick out the current users except yourself, do:

SELECT pg_terminate_backend(procpid)
FROM pg_stat_activity WHERE procpid <> pg_backend_pid();

>
> Thank you
> Alex
>


--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig&  Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
      http://www.postgresql.at/


pgsql-general by date:

Previous
From: Frank Lanitz
Date:
Subject: Re: Lock out PostgreSQL users for maintenance
Next
From: Adrian Klaver
Date:
Subject: Re: Variables inside plpythonu