Re: DROP TABLESPACE needs crash-resistance
От | Tom Lane |
---|---|
Тема | Re: DROP TABLESPACE needs crash-resistance |
Дата | |
Msg-id | 23796.1289323484@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | DROP TABLESPACE needs crash-resistance (Gurjeet Singh <singh.gurjeet@gmail.com>) |
Ответы |
Re: DROP TABLESPACE needs crash-resistance
|
Список | pgsql-hackers |
Gurjeet Singh <singh.gurjeet@gmail.com> writes: > We are facing a problem in dropping a tablespace after crash recovery. The > recovery starts from the last checkpoint, but the tables that were created > by > a transaction in a tablespace before the checkpoint are still lying around; > the > transaction had not finished by the time of crash. > After recovery, when the app tries to drop the tablespace, the command fails > because the tablespace directory is not empty. Hmm. The reason DROP TABLESPACE fails in that case, rather than just arbitrarily rm -rf'ing the files, is fear of deleting valuable data by accident. I suppose we could have a mode that deletes the files without any manual intervention, but personally I'd regard that as a foot-gun. > Solving this problem has become quite critical since the the platform where > Postgres is being used is supposed to run unattended. I'm not entirely clear as to the use-case for unattended DROP TABLESPACE? That doesn't really seem like an operation you should need on a routine basis. regards, tom lane
В списке pgsql-hackers по дате отправления: