| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: shrinking physical space used |
| Дата | |
| Msg-id | 20041114143551.GA23372@svana.org обсуждение исходный текст |
| Ответ на | shrinking physical space used (Bopolissimus Platypus Jr <bopolissimus.lists@gmail.com>) |
| Список | pgsql-general |
On Sun, Nov 14, 2004 at 01:50:10PM +0800, Bopolissimus Platypus Jr wrote: > hello all, > > i've got a database that takes up 4G of space. when i run a script that > deletes all rows and then vacuum, the data directory gets down to > around 3-3.5G. what i'd like is to get a blank database structure that > really contains no data at all, or any unused space at all. apparently > that's not what i'm getting now. is there a way to get this apart from > dump, initdb, restore? i figure that if i could dump/initdb/restore i'd > probably get a data directory with around 30MB only. Perhaps you should use TRUNCATE (the SQL command) rather than DELETE. It'll probably work better... You're probably still seeing the space the indexes are using. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера