Re: Drop/Re-Creating database extremely slow + doesn't lose data - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Drop/Re-Creating database extremely slow + doesn't lose data
Date
Msg-id CA+bJJbw_ceVYHefspFznhD=HPy9EOiwY+JO790TAcBg9SKhCDA@mail.gmail.com
Whole thread Raw
In response to Drop/Re-Creating database extremely slow + doesn't lose data  (Thalis Kalfigkopoulos <tkalfigo@gmail.com>)
List pgsql-general
Hi Thalis

On Tue, May 31, 2016 at 3:49 PM, Thalis Kalfigkopoulos <tkalfigo@gmail.com> wrote:
Intention: to drop a database and recreate it.
Expectation: the newly created db should be empty
What happens: dropping is fast, creation is slow, and when I reconnect, all the data objects are still there.

Commands (tried both through command line with dropdb/createdb and through psql)

​Creation is normally slower then dropping. This is normal, as it is a more involved process, and normally an unusual one, so I suspect it's being developed ​thinking more on correctness and verifiability than speed.

Onto the other​ problem. I did not see the drop commands in your examples. And neither did I see how the XXXX/YYYY data got to the first dafodb in the first place. ​And I saw you connect to template1. ¿ Are you aware databases in postgres are made by copying a template database ? Maybe you modified the default template database ( this tends to be template1 ) and this is the reason they are all equal ( read
https://www.postgresql.org/docs/9.5/static/manage-ag-templatedbs.html
​, and also think newly created postgres database are never empty, they have the system catalogs inside them ).

Francisco Olarte.​



pgsql-general by date:

Previous
From: Igor Neyman
Date:
Subject: Re: Drop/Re-Creating database extremely slow + doesn't lose data
Next
From: "David G. Johnston"
Date:
Subject: Re: Drop/Re-Creating database extremely slow + doesn't lose data