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

Поиск
Список
Период
Сортировка
От Francisco Olarte
Тема Re: Drop/Re-Creating database extremely slow + doesn't lose data
Дата
Msg-id CA+bJJbw_ceVYHefspFznhD=HPy9EOiwY+JO790TAcBg9SKhCDA@mail.gmail.com
обсуждение исходный текст
Ответ на Drop/Re-Creating database extremely slow + doesn't lose data  (Thalis Kalfigkopoulos <tkalfigo@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Igor Neyman
Дата:
Сообщение: Re: Drop/Re-Creating database extremely slow + doesn't lose data
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Drop/Re-Creating database extremely slow + doesn't lose data