Re: Disc space usage
От | Tom Lane |
---|---|
Тема | Re: Disc space usage |
Дата | |
Msg-id | 27956.1223471810@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Disc space usage (Matthew Wakeling <matthew@flymine.org>) |
Ответы |
Re: Disc space usage
Re: Disc space usage |
Список | pgsql-performance |
Matthew Wakeling <matthew@flymine.org> writes: > One of our build servers recently ran out of disc space while trying to > copy an entire database. This led me to investigate the database cluster, > which is stored on a RAID array with a total size of 1TB. Running a query > to list all databases and their sizes did not add up to the amount of > space being used by Postgres, so I had a look at the pgsql/base directory. > It appears that there are a few large directories that do not correspond > to any database. I wonder if these have been left behind accidentally by > Postgres. Anything under $PGDATA/base that doesn't correspond to a live row in pg_database is junk. The interesting question is how it got that way, and in particular how you seem to have managed to have repeated instances of it. I gather that you're in the habit of using CREATE DATABASE to copy large existing databases, so the most likely theory is that these are leftovers from previous failed copy attempts. Now CREATE DATABASE does attempt to clean up if its copying fails, but there are various ways to break that, for instance hitting control-C partway through the cleanup phase. So I'm wondering if maybe that's been done a few times. What PG version is this, anyway? regards, tom lane
В списке pgsql-performance по дате отправления: