Re: Drop Database

2021-03-18 Thread Adrian Klaver
On 3/18/21 3:39 PM, Gustavo FERREYRA wrote: Hello, a request, which may be resolved in another way and I did not see it. When doing a BACKUP plain and using "Include DROP DATABASE statement", could you add by default "IF EXISTS" ? https://www.postgresql.org/docs/12/app-pgdump.html --if-exists

Re: `DROP DATABASE RESTRICT` ?

2020-03-04 Thread David G. Johnston
On Wed, Mar 4, 2020 at 6:17 PM Brennan Vincent wrote: > Hello all, > > I was wondering if there is some reason why Postgres doesn't support a > `RESTRICT` option that would refuse to drop a database if it contains > any schemas or objects, similarly to the semantics of `DROP SCHEMA > [...] RESTRI

Re: drop database

2019-10-17 Thread Ron
There are other databases in the cluster. On 10/17/19 5:12 PM, Andrew Kerber wrote: If you are decommissioning the database, why not just rm -rf the whole system? On Thu, Oct 17, 2019 at 4:31 PM Michael Lewis > wrote: Your plan to loop over tables and truncate t

Re: drop database

2019-10-17 Thread pabloa98
Perhaps you want to TRUNCATE TABLEs. That will mitigate any I/O impact On Thu, Oct 17, 2019 at 3:13 PM Andrew Kerber wrote: > If you are decommissioning the database, why not just rm -rf the whole > system? > > On Thu, Oct 17, 2019 at 4:31 PM Michael Lewis wrote: > >> Your plan to loop over ta

Re: drop database

2019-10-17 Thread Andrew Kerber
If you are decommissioning the database, why not just rm -rf the whole system? On Thu, Oct 17, 2019 at 4:31 PM Michael Lewis wrote: > Your plan to loop over tables and truncate them seems great if you are > worried. It seems simple to verify that space is being freed as you go, and > also easy t

Re: drop database

2019-10-17 Thread Michael Lewis
Your plan to loop over tables and truncate them seems great if you are worried. It seems simple to verify that space is being freed as you go, and also easy to change tactics if the need arises. >

Re: drop database

2019-10-17 Thread Julie Nishimura
I think you don't swallow an entire elephant at once, you can choke on it, it is more safe to be eaten piece by piece:) From: Julie Nishimura Sent: Thursday, October 17, 2019 2:19 PM To: Ron ; pgsql-general@lists.postgresql.org Subject: Re: drop database

Re: drop database

2019-10-17 Thread Julie Nishimura
y, October 17, 2019 1:59 PM To: pgsql-general@lists.postgresql.org Subject: Re: drop database On 10/17/19 3:44 PM, Julie Nishimura wrote: Guys, can anybody reply if they drop any postgresql database larger than 1 tb and how long did it take? A lot has to do with how quickly the underlying file s

Re: drop database

2019-10-17 Thread Ron
On 10/17/19 3:44 PM, Julie Nishimura wrote: Guys, can anybody reply if they drop any postgresql database larger than 1 tb and how long did it take? A lot has to do with how quickly the underlying file system can delete files. To be honest, though... *does it really matter* how long it takes?