From: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
---|---|
To: | Thalis Kalfigkopoulos <tkalfigo(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Drop/Re-Creating database extremely slow + doesn't lose data |
Date: | 2016-05-31 14:00:00 |
Message-ID: | CA+bJJbw_ceVYHefspFznhD=HPy9EOiwY+JO790TAcBg9SKhCDA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Thalis
On Tue, May 31, 2016 at 3:49 PM, Thalis Kalfigkopoulos <tkalfigo(at)gmail(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Neyman | 2016-05-31 14:00:03 | Re: Drop/Re-Creating database extremely slow + doesn't lose data |
Previous Message | Melvin Davidson | 2016-05-31 13:55:55 | Re: Switching roles as an replacement of connection pooling tools |