Re: drop tablespace error: invalid argument
От | Jan Otto |
---|---|
Тема | Re: drop tablespace error: invalid argument |
Дата | |
Msg-id | A7100E92-9E7F-438C-B4A4-17927C56D142@me.com обсуждение исходный текст |
Ответ на | Re: drop tablespace error: invalid argument (Jan Otto <asche@me.com>) |
Ответы |
Re: drop tablespace error: invalid argument
|
Список | pgsql-hackers |
Jan Otto <asche@me.com> writes:ERROR: could not read directory "pg_tblspc/16464": Invalid argumentSTATEMENT: DROP TABLESPACE testspace;I have digged a bit around in the source code of postgresql to build aself contained test-case for Apple and found that the implementationof Apples readdir() is buggy. readdir() fails under some circumstances.So i have build a patch against current pgsql's HEAD to work aroundthe issue. If the bug in readdir() goes into the final release snow leopardwe have a solution.This patch basically frees dirdesc and rereads the tablespace locationin case a subdirectory was deleted from the tablespace. this is the placewhere snow leopard fails to read the next entry with readdir().
The bug in readdir() appeared in the final snow leopard too. Anybody
with Snow Leopard installed can check this, with simply doing the regression
tests (make check). The tablespace regression test is failing.
The patch i sent in works around the issue. if it is not acceptable to reread
the tablespace-directory after every delete i can rewrite the workaround.
Probably it is preferred that we write all entries of the directory into an array
and looping through that array after that instead of looping with ReadDir()?
regards, jan otto
В списке pgsql-hackers по дате отправления: