Re: How to detach a database

From: "sivapostgres(at)yahoo(dot)com" <sivapostgres(at)yahoo(dot)com>
To: Pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to detach a database
Date: 2021-08-19 14:21:01
Message-ID: 195210005.137441.1629382861380@mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,
We want to carry out some data manipulation work in a database exclusively.   We don't want any one to connect this database during that time.   How to do it ?
In SQL Server there are two ways [ earlier we used SQL Server and now switched to PG ]1.  Change the database to work in single-user mode.2.  Detach the database from that server, copy to another server, do the required changes, copy back to original server and attach it.
Yes, we do carry out this in the production database also, where we used to ask the users not to use the application.  
Is there any way to make a PG database either in-active or switch to single-user mode ?  We want to avoid DELETE database process.
Happiness AlwaysBKR Sivaprakash

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2021-08-19 14:24:28 Re: How to detach a database
Previous Message Magnus Hagander 2021-08-19 14:07:52 Re: Licensing