pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feeddrop database
10+ messages / 7 participants
[nested] [flat]
* drop database
@ 2019-10-17 20:44 Julie Nishimura <juliezain@hotmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julie Nishimura @ 2019-10-17 20:44 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general
Guys, can anybody reply if they drop any postgresql database larger than 1 tb and how long did it take?
Thanks
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 20:59 Ron <ronljohnsonjr@gmail.com>
parent: Julie Nishimura <juliezain@hotmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Ron @ 2019-10-17 20:59 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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? (If I
were worried about it -- which I might be -- then I'd put a DROP DATABASE
script in crontab and run it from there.)
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 21:19 Julie Nishimura <juliezain@hotmail.com>
parent: Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julie Nishimura @ 2019-10-17 21:19 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Ive seen some performance degradation on some other RDBMS systems when "drop database" was in progress. We need to drop database which is 16 tb with minimal impact for our end users. There are 32 other databases with hundreds of connections on the same cluster, and I just want to release the space with minimal impact. Trying to find the best solution. I could even script 'truncate table' or 'drop table' in the loop if it helps. I dont have luxury to test such large db drop in action.
Thanks!
________________________________
From: Ron <ronljohnsonjr@gmail.com>
Sent: Thursday, October 17, 2019 1:59 PM
To: pgsql-general@lists.postgresql.org <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 system can delete files.
To be honest, though... does it really matter how long it takes? (If I were worried about it -- which I might be -- then I'd put a DROP DATABASE script in crontab and run it from there.)
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 21:21 Julie Nishimura <juliezain@hotmail.com>
parent: Julie Nishimura <juliezain@hotmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Julie Nishimura @ 2019-10-17 21:21 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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 <juliezain@hotmail.com>
Sent: Thursday, October 17, 2019 2:19 PM
To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: drop database
Ive seen some performance degradation on some other RDBMS systems when "drop database" was in progress. We need to drop database which is 16 tb with minimal impact for our end users. There are 32 other databases with hundreds of connections on the same cluster, and I just want to release the space with minimal impact. Trying to find the best solution. I could even script 'truncate table' or 'drop table' in the loop if it helps. I dont have luxury to test such large db drop in action.
Thanks!
________________________________
From: Ron <ronljohnsonjr@gmail.com>
Sent: Thursday, October 17, 2019 1:59 PM
To: pgsql-general@lists.postgresql.org <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 system can delete files.
To be honest, though... does it really matter how long it takes? (If I were worried about it -- which I might be -- then I'd put a DROP DATABASE script in crontab and run it from there.)
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 21:31 Michael Lewis <mlewis@entrata.com>
parent: Julie Nishimura <juliezain@hotmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Michael Lewis @ 2019-10-17 21:31 UTC (permalink / raw)
To: Julie Nishimura <juliezain@hotmail.com>; +Cc: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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.
>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 22:12 Andrew Kerber <andrew.kerber@gmail.com>
parent: Michael Lewis <mlewis@entrata.com>
0 siblings, 2 replies; 10+ messages in thread
From: Andrew Kerber @ 2019-10-17 22:12 UTC (permalink / raw)
To: Michael Lewis <mlewis@entrata.com>; +Cc: Julie Nishimura <juliezain@hotmail.com>; Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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 <mlewis@entrata.com> 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 to change tactics if the need arises.
>
>>
--
Andrew W. Kerber
'If at first you dont succeed, dont take up skydiving.'
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 22:23 pabloa98 <pabloa98@gmail.com>
parent: Andrew Kerber <andrew.kerber@gmail.com>
1 sibling, 0 replies; 10+ messages in thread
From: pabloa98 @ 2019-10-17 22:23 UTC (permalink / raw)
To: Andrew Kerber <andrew.kerber@gmail.com>; +Cc: Michael Lewis <mlewis@entrata.com>; Julie Nishimura <juliezain@hotmail.com>; Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Perhaps you want to TRUNCATE TABLEs. That will mitigate any I/O impact
On Thu, Oct 17, 2019 at 3:13 PM Andrew Kerber <andrew.kerber@gmail.com>
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 <mlewis@entrata.com> 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 to change tactics if the need arises.
>>
>>>
>
> --
> Andrew W. Kerber
>
> 'If at first you dont succeed, dont take up skydiving.'
>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: drop database
@ 2019-10-17 23:55 Ron <ronljohnsonjr@gmail.com>
parent: Andrew Kerber <andrew.kerber@gmail.com>
1 sibling, 0 replies; 10+ messages in thread
From: Ron @ 2019-10-17 23:55 UTC (permalink / raw)
To: ; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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 <mlewis@entrata.com
> <mailto:mlewis@entrata.com>> 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 to change tactics if the need arises.
>
>
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Drop Database
@ 2021-03-18 22:39 Gustavo FERREYRA <gustavoferreyra@gmail.com>
0 siblings, 1 reply; 10+ messages in thread
From: Gustavo FERREYRA @ 2021-03-18 22:39 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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" ?
Because when doing a restore, if the database does not exist, it gives an
error and you have to edit the file to comment out the line.
Thanks for your work and congratulations, it is a very useful and beautiful
tool.
Greetings cordially.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Drop Database
@ 2021-03-18 23:05 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Gustavo FERREYRA <gustavoferreyra@gmail.com>
0 siblings, 0 replies; 10+ messages in thread
From: Adrian Klaver @ 2021-03-18 23:05 UTC (permalink / raw)
To: Gustavo FERREYRA <gustavoferreyra@gmail.com>; pgsql-general@lists.postgresql.org
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
Use conditional commands (i.e., add an IF EXISTS clause) when
cleaning database objects. This option is not valid unless --clean is
also specified.
> Because when doing a restore, if the database does not exist, it gives
> an error and you have to edit the file to comment out the line.
Which should not be causing an issue.
> Thanks for your work and congratulations, it is a very useful and
> beautiful tool.
> Greetings cordially.
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2021-03-18 23:05 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 20:44 drop database Julie Nishimura <juliezain@hotmail.com>
2019-10-17 20:59 ` Ron <ronljohnsonjr@gmail.com>
2019-10-17 21:19 ` Julie Nishimura <juliezain@hotmail.com>
2019-10-17 21:21 ` Julie Nishimura <juliezain@hotmail.com>
2019-10-17 21:31 ` Michael Lewis <mlewis@entrata.com>
2019-10-17 22:12 ` Andrew Kerber <andrew.kerber@gmail.com>
2019-10-17 22:23 ` pabloa98 <pabloa98@gmail.com>
2019-10-17 23:55 ` Ron <ronljohnsonjr@gmail.com>
2021-03-18 22:39 Drop Database Gustavo FERREYRA <gustavoferreyra@gmail.com>
2021-03-18 23:05 ` Re: Drop Database Adrian Klaver <adrian.klaver@aklaver.com>
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