Search Postgresql Archives

Re: Drop/Re-Creating database extremely slow + doesn't lose data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thalis

On Tue, May 31, 2016 at 3:49 PM, Thalis Kalfigkopoulos <tkalfigo@xxxxxxxxx> 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.​




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux