pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: sivapostgres@yahoo.com <sivapostgres@yahoo.com>
To: Pgsql-general General <pgsql-general@postgresql.org>
Subject: Re:  How to detach a database
Date: Thu, 19 Aug 2021 14:21:01 +0000 (UTC)
Message-ID: <195210005.137441.1629382861380@mail.yahoo.com> (raw)
References: <195210005.137441.1629382861380.ref@mail.yahoo.com>

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

view thread (3+ messages)  latest in thread

Message-ID: <195210005.137441.1629382861380@mail.yahoo.com>
Permalink:  ../195210005.137441.1629382861380@mail.yahoo.com/
Also on:    postgresql.org/message-id/195210005.137441.1629382861380@mail.yahoo.com

 · 

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 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: sivapostgres@yahoo.com
  Subject: Re: How to detach a database
  In-Reply-To: <195210005.137441.1629382861380@mail.yahoo.com>
  References: <195210005.137441.1629382861380.ref@mail.yahoo.com> <195210005.137441.1629382861380@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