Unused files in the database directory after crashed VACUUM FULL

Поиск
Список
Период
Сортировка
От Hannes Erven
Тема Unused files in the database directory after crashed VACUUM FULL
Дата
Msg-id da60fd67-f660-39f2-764f-c5792ca568e8@erven.at
обсуждение исходный текст
Ответы Re: Unused files in the database directory after crashed VACUUM FULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,


I've just had a "VACUUM FULL <table>" crash due to 100% disk usage.
Clearly my fault, I was expecting the new table to be small enough.

After freeing up space, restarting the cluster and issuing another 
VACCUM FULL, I noticed that the cluster was way bigger that it should be.
In the base/<db>/ folder, there was a large number of files with one 
certain number that pg_filenode_relation() could not turn into a 
relation. As that number was just a bit smaller that the 
pg_relation_filepath() of the table I was working on, I guess these were 
the remains of the failed VACUUM FULL operation?
I removed those files and a VACCUM ANALYZE of the whole database went fine.

So... is this the expected behaviour? Is there a safe procedure how to 
check/clean up "unnecessary" files in the cluster directory?


Version:
('PostgreSQL 10.3 (Debian 10.3-1.pgdg90+1) on x86_64-pc-linux-gnu, 
compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit')

Table definition:
(
     id serial PRIMARY KEY,
     data bytea,
     parent_id integer NOT NULL
)
The "data" column values are large enough to be TOASTed.


Thanks & best regards,

    -hannes



В списке pgsql-general по дате отправления:

Предыдущее
От: rob stone
Дата:
Сообщение: Re: Server goes to Recovery Mode when run a SQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unused files in the database directory after crashed VACUUM FULL